fix:更新

This commit is contained in:
吕新雨
2026-02-03 00:26:13 +08:00
parent 4d70f16b69
commit 5dd632d4d3
2 changed files with 4 additions and 50 deletions

View File

@@ -81,7 +81,10 @@ jobs:
# 写入私钥
if [[ -n "${SSH_KEY_B64:-}" ]]; then
if ! printf '%s' "${SSH_KEY_B64}" | base64 -d | tr -d '\r' > ~/.ssh/id_rsa; then
# 去掉粘贴过程中可能混入的空白字符(换行/回车/空格/Tab
# 避免出现base64: invalid input
CLEAN_B64="$(printf '%s' "${SSH_KEY_B64}" | tr -d '\r\n\t ')"
if ! printf '%s' "${CLEAN_B64}" | base64 -d | tr -d '\r' > ~/.ssh/id_rsa; then
echo "私钥 base64 解码失败:请确认你配置的 *_SSH_KEY_B64 是对私钥文件做的 base64单行且未被截断。"
exit 1
fi