From e45fe38aef1c521ed6cdefed5b1cb141500c77a2 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Thu, 17 Apr 2025 20:08:06 +0800 Subject: [PATCH] no message --- app/Http/Controllers/CronController.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/CronController.php b/app/Http/Controllers/CronController.php index a53d972..7f2bd1f 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 $sHostName; private $sProjectPath; private $sProjectUrl; @@ -86,9 +86,8 @@ class CronController foreach ($aArticle as $row) { $this->sUserName = $row["user_name"]; $this->sProjectName = $row["project_name"]; - $this->sHostName = $row['host_name']; - $this->sProjectPath = env("BASE_DIR")."github/".$this->sHostName."-".$this->sProjectName; - $this->sProjectUrl = env("github_url_base").":".$this->sHostName."/".$this->sProjectName.".git"; + $this->sProjectPath = env("BASE_DIR")."github/".$this->sUserName."-".$this->sProjectName; + $this->sProjectUrl = env("github_url_base").":".$this->sUserName."/".$this->sProjectName.".git"; $this->aArticle = $row; list($sClass, $sFunc) = explode('#', $row['mod']); @@ -136,10 +135,10 @@ class CronController { // 定义要添加的配置 - $host = $this->sHostName; + $host = $this->sUserName; $hostname = "github.com"; $user = "git"; - $identityFile = env("path_ssh")."/id_rsa_".$sHostName; + $identityFile = env("path_ssh")."/id_rsa_".$host; // 构建配置字符串 $config = "\nHost ".$host.".com\n";