Update my-first-workflow.yaml
This commit is contained in:
@@ -38,13 +38,7 @@ steps:
|
||||
- chmod 600 /root/.ssh/known_hosts
|
||||
|
||||
- echo "🔍 尝试SSH连接GitHub(详细日志)..."
|
||||
- ssh -vvv -i /root/.ssh/id_ed25519 -o StrictHostKeyChecking=accept-new git@github.com 2>&1; exit 0;
|
||||
echo "❌ SSH连接GitHub失败,请检查:";
|
||||
echo " 1. WOODPECKER_SSH_KEY是完整的无密码私钥";
|
||||
echo " 2. 对应公钥已添加到GitHub账号(Settings → SSH and GPG keys)";
|
||||
echo " 3. CI服务器IP未被GitHub IP白名单拦截";
|
||||
exit 1;
|
||||
}
|
||||
- ssh -vvv -i /root/.ssh/id_ed25519 -o StrictHostKeyChecking=accept-new git@github.com 2>&1
|
||||
# 拉取代码(拆分命令,避免静默失败)
|
||||
- git init
|
||||
- git remote add origin $CI_REPO_CLONE_SSH_URL
|
||||
|
||||
Reference in New Issue
Block a user