1
This commit is contained in:
@@ -55,12 +55,12 @@ steps:
|
||||
|
||||
# 替换原SSH认证判断代码
|
||||
- |
|
||||
ssh_output=$(ssh -vvv -i /root/.ssh/id_ed25519 -o StrictHostKeyChecking=accept-new git@github.com 2>&1)
|
||||
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_output"
|
||||
echo "===== SSH日志结束 ====="
|
||||
if echo "$ssh_output" | grep -q "successfully authenticated"; then
|
||||
if echo "$$ssh_output" | grep -q "successfully authenticated"; then
|
||||
echo "✅ SSH认证成功(忽略正常的Exit status 1)"
|
||||
else
|
||||
echo "❌ SSH认证失败!"
|
||||
|
||||
Reference in New Issue
Block a user