build
液滴是Ubuntu 24.04.1 LTS,不再支持SHA-1键我有一个很好的工作,但是由于无效的公共密钥将公共密钥和私钥划入存储库设置>管道> ssh键
rsync
bitbucket-pipelines.yml
Permission denied (publickey)
/etc/log/auth.log
但应该避免这种情况。 由于不建议使用SHA-1键,因此我想知道我做错了什么以及如何正确使用永不钥匙。任何帮助将不胜感激。
我遇到了同样的问题,并通过使用用于多个SSH键的记录方法并生成我自己的键。
对于您和我自己的未来便利性,我在这里报告了我遵循的步骤(这些是针对Linux)`。 为了方便起见,我将这些命令运行到管道必须向SSH的主机上运行:
使用不使用密码来生成SSH键:
userauth_pubkey: signature algorithm ssh-rsa not in PubkeyAcceptedAlgorithms
obtain obtain the公钥:ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
在管道必须要使用的主机中,将公共密钥添加到授权的主机中。当我在同一主机上生成它们时,我只是做到了:
the obtain base64编码私钥:PubkeyAuthentication yes
PubkeyAcceptedKeyTypes
+ssh-rsa
在bitbucket中,导航到存储库变量
ssh-keygen -t ed25519 -b 4096 -C "[email protected]" -f ~/.ssh/bitbucket_pipelines
cat ~/.ssh/bitbucket_pipelines.pub
如果要仅应用于特定部署),并添加一个新的变量,例如base64编码私有密钥的base64 (从上一个步骤)作为值。在您的管道脚本中,将变量值转换为有效的身份文件,然后将其添加到SSH配置中。就我而言,我确实喜欢这样:
cat ~/.ssh/bitbucket_pipelines.pub >> ~/.ssh/authorized_keys