diff --git a/app/Http/Controllers/CronController.php b/app/Http/Controllers/CronController.php index 7f2bd1f..2e666f6 100755 --- a/app/Http/Controllers/CronController.php +++ b/app/Http/Controllers/CronController.php @@ -11,7 +11,7 @@ class CronController private $sUserName; private $sProjectName; -// private $sHostName; + private $sMailName; private $sProjectPath; private $sProjectUrl; @@ -85,9 +85,10 @@ class CronController { foreach ($aArticle as $row) { $this->sUserName = $row["user_name"]; + $this->sMailName = $row["mail_name"]; $this->sProjectName = $row["project_name"]; $this->sProjectPath = env("BASE_DIR")."github/".$this->sUserName."-".$this->sProjectName; - $this->sProjectUrl = env("github_url_base").":".$this->sUserName."/".$this->sProjectName.".git"; + $this->sProjectUrl = "git@".$this->sMailName.".com:".$this->sUserName."/".$this->sProjectName.".git"; $this->aArticle = $row; list($sClass, $sFunc) = explode('#', $row['mod']); @@ -135,7 +136,7 @@ class CronController { // 定义要添加的配置 - $host = $this->sUserName; + $host = $this->sMailName; $hostname = "github.com"; $user = "git"; $identityFile = env("path_ssh")."/id_rsa_".$host;