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

这篇博客介绍了在使用OpenSSH_8.8p1遇到与gitee.com服务器的ssh-pilot-1.0.7协议不匹配,导致'Permission denied (publickey)'的问题。解决方案包括:1) 修改配置添加PubkeyAcceptedKeyTypes支持ssh-rsa;2) 生成新的ed25519密钥;3) 降级OpenSSH版本。
摘要由CSDN通过智能技术生成

OpenSSH_8.8p1, OpenSSL 1.1.1l 24 Aug 2021
debug1: Reading configuration data /c/Users/28761/.ssh/config
debug1: /c/Users/28761/.ssh/config line 19: Applying options for gitee.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to gitee.com [180.97.125.228] port 22.
debug1: Connection established.
debug1: identity file C:/Users/28761/.ssh/gitee/id_rsa type 0
debug1: identity file C:/Users/28761/.ssh/gitee/id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.8
debug1: Remote protocol version 2.0, remote software version ssh-pilot-1.0.7
debug1: compat_banner: no match: ssh-pilot-1.0.7
debug1: Authenticating to gitee.com:22 as 'git'
debug1: load_hostkeys: fopen /c/Users/28761/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:FQGC9Kn/eye1W8icdBgrQp+KkGYoFgbVr17bmjey0Wc
debug1: load_hostkeys: fopen /c/Users/28761/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'gitee.com' is known and matches the ECDSA host key.
debug1: Found key in /c/Users/28761/.ssh/known_hosts:8
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: C:/Users/28761/.ssh/gitee/id_rsa RSA SHA256:gcyOVu3sPIanWpl61wR9 explicit
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: C:/Users/28761/.ssh/gitee/id_rsa RSA SHA256:gcyOVu3sPIanWpl61wR9NRmUFn+nM3+9o explicit
debug1: send_pubkey_test: no mutual signature algorithm
debug1: No more authentication methods to try.
git@gitee.com: Permission denied (publickey).

可以看到 no mutual signature algorithm(没有公共的签名算法),高版本OpenSSH没有启用ssh-rsa,

解决方案:
1、参考链接,添加 PubkeyAcceptedKeyTypes +ssh-rsa 配置即可
2、更换秘钥生成算法,使用 ed25519 算法生成
ssh-keygen -t ed25519 -C "your email"
3、降低 OpenSSH版本

  • 5
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值