From 2e157ee1a719d61077447bf48f593368158fb351 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Mon, 14 Apr 2025 14:47:46 +0800 Subject: [PATCH] no message --- app/Http/Controllers/CronController.php | 4 ++-- github/init.sh | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/CronController.php b/app/Http/Controllers/CronController.php index a5fdb07..582d98a 100755 --- a/app/Http/Controllers/CronController.php +++ b/app/Http/Controllers/CronController.php @@ -80,11 +80,11 @@ class CronController $sGithubProjectUrl = env("github_url_base").":".$this->sUserName."/".$this->sProjectName.".git"; - $output = shell_exec("sh " . $sGitShDir . "/init.sh " . escapeshellarg($sUserProjectDir) . " " . escapeshellarg($sGithubProjectUrl)); + $output = shell_exec("sh " . $sGitShDir . "/init.sh " . escapeshellarg($sUserProjectDir) . " " . escapeshellarg($sGithubProjectUrl) . " " . escapeshellarg($this->sUserName)); echo "Output from init.sh:\n$output\n"; -// $output = shell_exec("git config --global --add safe.directory $sUserProjectDir 2>&1"); + $output = shell_exec("git config --global --add safe.directory $sUserProjectDir 2>&1"); // // echo "
Output from --add safa.directory:\n$output\n"; } diff --git a/github/init.sh b/github/init.sh index 9fb737b..5a824d7 100755 --- a/github/init.sh +++ b/github/init.sh @@ -15,6 +15,10 @@ git init # 添加安全目录 git config --local --add safe.directory "$1" +# 设置用户 +git config --local user.name "$3" +git config --local user.email "$3"."@tuta.io" + # 添加文件到暂存区 git add .