顾文强
顾文强
Published on 2025-01-24 / 3 Visits
0
0

Pycharm / Idea Git推送时出错

Pycharm/Idea 内置Git模块推送时报错

Unable to negotiate with 43.135.163.94 port 29418: 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.

原因分析:

之所以报错是因为OpenSSH7.0以后的版本不再支持ssh-dss(DSA)算法,官方的说法是这个算法太弱了。

解决方式

  1. 找到路径C:/Users/Administrator/.ssh下的config文件,如果不存在则创建一个

  2. 在文件中添加如下内容后保存。

Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa


Comment