windows下Idea使用git clone failed. Could not read from remote repository.
阿新 • • 發佈:2020-09-15
剛入職新公司,等了好幾天,今天公司給發了新電腦,就要開始進行開發環境的安裝了。
在軟體(JDK,GIT,IDEA,MYSQL,Navicate。。。等等)都安裝完成後,就開始專案的下載。
下載專案:
在使用IDEA下載的過程中就發現了新的問題---根據gitlab中專案的地址進行下載時提示“clone failed. Could not read from remote repository.”
直接翻譯是 “遠端倉庫無法讀取”。
為什麼會無法讀取呢?
1、無法連結伺服器
確認是可以連上伺服器的。
2、IDEA中git整合中使用的ssh方式問題
在解決問題的過程中看到stackoverflow中是讓更改“SSH executable” 方式為 Native,試過無效。。。
3、無法通過SSH的連結驗證。
所以可以通過建立ssh key 並將產生的id_rsa.pub的內容加到gitlab的後臺就可以解決問題了。
a.產生key
ssh-keygen -t rsa -C "你的帳號名"
生成過程採用預設方式,直接按enter鍵到生成id_rsa,id_rsa.pub
將生成的id_rsa.pub中的內容新增到相應的git伺服器,個人帳號裡面。
b.加key
到此這篇關於windows下Idea使用git clone failed. Could not read from remote repository.的文章就介紹到這了,更多相關Idea使用git clone failed內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!