ssh-clone问题记录

本文介绍了解决使用git clone时遇到的nomatchinghostkeytypefound错误的方法。通过修改ssh配置文件,指定支持的Hostkey算法来解决此问题。提供了两种配置方式:直接修改ssh_config文件或是在.ssh目录下创建config文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

git clone no matching host key type found问题记录

报错信息
Unable to negotiate with 主机地址 port 端口号: no matching host key type found. Their offer: ssh-rsa,ssh-dss

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.
解决办法
修改C:\Users\Nova004992\AppData\Local\Programs\Git\etc\ssh\ssh_config配置文件
Host git.xxx.net
	HostkeyAlgorithms +ssh-rsa
	PubkeyAcceptedAlgorithms +ssh-rsa
# Added by git-extra Host后面替换为自己的git域名
Host git.xxx.net   
	HostkeyAlgorithms +ssh-rsa
	PubkeyAcceptedAlgorithms +ssh-rsa

其他解决办法

到当前用户目录下的.ssh文件中创建config文件,添加内容如下:
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

相关链接

https://blog.youkuaiyun.com/u013214821/article/details/122804133?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2~default~BlogCommendFromBaidu~default-1.pc_relevant_without_ctrlist&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2~default~BlogCommendFromBaidu~default-1.pc_relevant_without_ctrlist&utm_relevant_index=1

https://www.cnblogs.com/daibeisi/p/15662546.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值