This commit is contained in:
1
2026-01-27 07:31:54 +00:00
parent 162c624c77
commit bdd822acb1

View File

@@ -53,14 +53,18 @@ steps:
- ssh-keygen -lf /root/.ssh/id_ed25519 || { echo "❌ SSH密钥解析失败"; exit 1; }
- echo "🔍 尝试SSH连接GitHub详细日志..."
# 替换原SSH认证判断代码
- |
ssh_output=$(ssh -vvv -i /root/.ssh/id_ed25519 -o StrictHostKeyChecking=accept-new git@github.com 2>&1)
echo "===== 完整SSH连接日志 ====="
echo "$ssh_output"
echo "===== SSH日志结束 ====="
if echo "$ssh_output" | grep -q "successfully authenticated"; then
echo "✅ SSH认证成功忽略正常的Exit status 1"
echo "✅ SSH认证成功忽略正常的Exit status 1"
else
echo "❌ SSH认证失败,日志:"
echo "$ssh_output"
exit 1 # 仅在真失败时终止流程
echo "❌ SSH认证失败"
exit 1
fi
#- ssh -vvv -i /root/.ssh/id_ed25519 -o StrictHostKeyChecking=accept-new git@github.com 2>&1
# 拉取代码拆分命令添加错误处理避免静默失败