From 51137625deef77b70303bfbefb9e631f5c3bb99b Mon Sep 17 00:00:00 2001 From: lhx Date: Thu, 30 Oct 2025 15:52:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/deploy.sh b/deploy.sh index 788f120..fb764b6 100644 --- a/deploy.sh +++ b/deploy.sh @@ -21,25 +21,7 @@ fi if [ $SKIP_GIT_PULL -eq 0 ]; then echo "" echo "正在拉取最新代码..." - - # 读取gitea用户名和密码 - echo -n "请输入gitea用户名: " - read -r GIT_USERNAME - echo -n "请输入gitea密码: " - read -s GIT_PASSWORD - echo "" - - # 直接使用URL中的用户名密码进行拉取 - git_url=$(git remote get-url origin) - if [[ $git_url == http* ]]; then - # 如果是http/https URL,替换为包含用户名密码的URL - git_url_with_auth=$(echo $git_url | sed "s|https://|https://$GIT_USERNAME:$GIT_PASSWORD@|") - git pull $git_url_with_auth main - else - # 如果是ssh或其他格式,使用expect或者让git自动处理 - echo "使用凭据拉取代码..." - git pull origin main - fi + git pull origin main if [ $? -eq 0 ]; then echo "✓ 代码拉取成功"