Git 常見問題: unable to negotiate with *.*.*.*: no matching key exchange methodfound...

weixin_33766168發表於2017-11-02

在Windows上更新了git 版本後,clone/pull時出現錯誤,

unable to negotiate with *.*.*.*: no matching key exchange methodfound. Their offer: diffie-hellman-group1-sha1

解決方法:在執行git pull/clone之前,輸入:

export GIT_SSH_COMMAND='ssh -o KexAlgorithms=+diffie-hellman-group1-sha1'  

這種方法每次開啟git視窗,都要重新輸入一次。

以在C:\Users\Spring\.ssh的config檔案下,新增內容如下,[本人測試有作用]

Host *.*.*.* 
KexAlgorithms +diffie-hellman-group1-sha1


本文轉自Work Hard Work Smart部落格園部落格,原文連結:http://www.cnblogs.com/linlf03/p/5806896.html,如需轉載請自行聯絡原作者