git clone 出現 diffie-hellman-group1-sha1
阿新 • • 發佈:2019-01-14
文章目錄
1、簡介
在配置geit ,使用git clone下拉程式碼的時候 出現的錯誤:
Unable to negotiate with ...* port 29419: 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.
此時已經添加了 public key.
2、解決方法
(1) 切換到 .ssh 資料夾
(2) 新建檔案 : gedit config 填寫
Host ×××.×××.××.××
KexAlgorithms +diffie-hellman-group1-sha1
文中的 ×××.×××.××.×× 就是 你下載訪問的服務 ip 地址
(3) 設定 文字許可權 660 : sudo chmod 660 config
3、重新 gitclone
問題解決