Skip to content

Commit 9f1a871

Browse files
committed
Update deploy.yml
1 parent c8923a1 commit 9f1a871

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ jobs:
4444
mkdir -p ~/.ssh
4545
printf '%s\n' "$DEPLOY_KEY" > ~/.ssh/deploy_key
4646
chmod 600 ~/.ssh/deploy_key
47+
# 服务器较旧(OpenSSH 5.x),只认旧的 ssh-rsa(SHA-1) 签名,
48+
# 而新版 OpenSSH 默认禁用了它,所以要显式加回 PubkeyAcceptedAlgorithms=+ssh-rsa,
49+
# 否则会报 "sign_and_send_pubkey: no mutual signature supported"。
4750
rsync -avz --delete --exclude='*.pyc' \
48-
-e "ssh -i ~/.ssh/deploy_key -p ${SERVER_PORT:-22} -o StrictHostKeyChecking=no" \
51+
-e "ssh -i ~/.ssh/deploy_key -p ${SERVER_PORT:-22} -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o PubkeyAcceptedAlgorithms=+ssh-rsa" \
4952
./website/public/ \
5053
"${SSH_USERNAME}@${SSH_HOST}:${SERVER_DESTINATION:-/var/www/books/leetcode/}"

0 commit comments

Comments
 (0)