汤亚兰 發表於 2021-10-18 14:14:00

无法将代码推送到gitee仓库故障处理(no mutual signature algorithm)

<p>OpenSSH_8.8p1, OpenSSL 1.1.1l24 Aug 2021<br>
debug1: Reading configuration data /c/Users/28761/.ssh/config<br>
debug1: /c/Users/28761/.ssh/config line 19: Applying options for gitee.com<br>
debug1: Reading configuration data /etc/ssh/ssh_config<br>
debug1: Connecting to gitee.com port 22.<br>
debug1: Connection established.<br>
debug1: identity file C:/Users/28761/.ssh/gitee/id_rsa type 0<br>
debug1: identity file C:/Users/28761/.ssh/gitee/id_rsa-cert type -1<br>
debug1: Local version string SSH-2.0-OpenSSH_8.8<br>
debug1: Remote protocol version 2.0, remote software version ssh-pilot-1.0.7<br>
debug1: compat_banner: no match: ssh-pilot-1.0.7<br>
debug1: Authenticating to gitee.com:22 as 'git'<br>
debug1: load_hostkeys: fopen /c/Users/28761/.ssh/known_hosts2: No such file or directory<br>
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory<br>
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory<br>
debug1: SSH2_MSG_KEXINIT sent<br>
debug1: SSH2_MSG_KEXINIT received<br>
debug1: kex: algorithm: curve25519-sha256@libssh.org<br>
debug1: kex: host key algorithm: ecdsa-sha2-nistp256<br>
debug1: kex: server-&gt;client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none<br>
debug1: kex: client-&gt;server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none<br>
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY<br>
debug1: SSH2_MSG_KEX_ECDH_REPLY received<br>
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:FQGC9Kn/eye1W8icdBgrQp+KkGYoFgbVr17bmjey0Wc<br>
debug1: load_hostkeys: fopen /c/Users/28761/.ssh/known_hosts2: No such file or directory<br>
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory<br>
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory<br>
debug1: Host 'gitee.com' is known and matches the ECDSA host key.<br>
debug1: Found key in /c/Users/28761/.ssh/known_hosts:8<br>
debug1: rekey out after 134217728 blocks<br>
debug1: SSH2_MSG_NEWKEYS sent<br>
debug1: expecting SSH2_MSG_NEWKEYS<br>
debug1: SSH2_MSG_NEWKEYS received<br>
debug1: rekey in after 134217728 blocks<br>
debug1: Will attempt key: C:/Users/28761/.ssh/gitee/id_rsa RSA SHA256:gcyOVu3sPIanWpl61wR9 explicit<br>
debug1: SSH2_MSG_SERVICE_ACCEPT received<br>
debug1: Authentications that can continue: publickey<br>
debug1: Next authentication method: publickey<br>
debug1: Offering public key: C:/Users/28761/.ssh/gitee/id_rsa RSA SHA256:gcyOVu3sPIanWpl61wR9NRmUFn+nM3+9o explicit<br>
debug1: send_pubkey_test: no mutual signature algorithm<br>
debug1: No more authentication methods to try.<br>
git@gitee.com: Permission denied (publickey).</implicit></implicit></p>
<p>可以看到 no mutual signature algorithm(没有公共的签名算法),高版本OpenSSH没有启用ssh-rsa,</p>
<p>解决方案:<br>
1、参考链接,添加 PubkeyAcceptedKeyTypes +ssh-rsa 配置即可<br>
2、更换秘钥生成算法,使用 ed25519 算法生成<br>
ssh-keygen -t ed25519 -C "your email"<br>
3、降低 OpenSSH版本</p><br><br>
来源:https://www.cnblogs.com/ice-image/p/15420411.html
頁: [1]
查看完整版本: 无法将代码推送到gitee仓库故障处理(no mutual signature algorithm)