(轉(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
好,問題解決了。