安裝CommondLine解決升級MAC OS后git不可用的問題。

(轉(zhuǎn)自:忘了哪里了,做個記錄,以便將來又忘記了。感謝原作者!)

安裝CommondLine解決升級MAC OS后git不可用的問題。

xcode-select --install

在使用git fetch的時候,遇到了如下錯誤

Unable to negotiate with 192.168.4.28 port 19428: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

http://blog.csdn.net/shadow066/article/details/51222577

2、修改ssh config文件

sudo gedit /etc/ssh/ssh_config

在host下加入

KexAlgorithms=+diffie-hellman-group1-sha1

3、還有一個辦法

在用戶目錄下的.ssh文件夾新建一個config文件

輸入

Host *

KexAlgorithms +diffie-hellman-group1-sha1

好,問題解決了。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容