(轉(zhuǎn)自:忘了哪里了,做個(gè)記錄萍膛,以便將來(lái)又忘記了吭服。感謝原作者!)
安裝CommondLine解決升級(jí)MAC OS后git不可用的問(wèn)題蝗罗。
xcode-select --install
在使用git fetch的時(shí)候艇棕,遇到了如下錯(cuò)誤
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串塑、還有一個(gè)辦法
在用戶目錄下的.ssh文件夾新建一個(gè)config文件
輸入
Host *
KexAlgorithms +diffie-hellman-group1-sha1
好沼琉,問(wèn)題解決了。