Git访问仓库出现Permission denied (keyboard-interactive,publickey)

在这里插入图片描述

问题:

最近在配置局域网的git的时候,遇到Git访问仓库出现Permission denied (keyboard-interactive,publickey)的问题,试了好久,终于找到问题所在:

  • GIT 2.33.1版本集成了最新的OpenSSH v8.8p1版本,此版本放弃了历史相当悠久的rsa-sha1的支持。

在这里插入图片描述

Administrator@F-PC MINGW64 /c/workspace
$ git clone Android@192.183.3.177:repos/StampWiki
Cloning into 'StampWiki'...
The authenticity of host '192.183.3.177 (192.183.3.177)' can't be established.
ECDSA key fingerprint is SHA256:Q86ILdzsxc1P6yPlN5xZ2rRd4XUoe53ov6KjqqmDZmk.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.183.3.177' (ECDSA) to the list of known hosts.
Android@192.183.3.177: Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

解决办法:

可以在密钥所在的.ssh目录下的config文件(没有的话自行创建)添加如下配置即可访问。

Host 192.183.3.177(这里替换为git主机的ip地址)
HostkeyAlgorithms +ssh-rsa 
PubkeyAcceptedAlgorithms +ssh-rsa

然后问题就解决了。

在这里插入图片描述

Administrator@F-PC MINGW64 /c/workspace
$ git clone Android@192.183.3.177:repos/StampWiki
Cloning into 'StampWiki'...
remote: Enumerating objects: 2345, done.
remote: Counting objects: 100% (2345/2345), done.
remote: Compressing objects: 100% (1540/1540), done.
Receiving objects: 100% (2345/2345), 18.32 MiB | 5.98 MiB/s, done.
remote: Total 2345 (delta 1191), reused 1020 (delta 487)
Resolving deltas: 100% (1191/1191), done.

参考帖子:https://blog.csdn.net/cjmqas/article/details/120980593

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值