windows下Idea使用git clone failed. Could not read from remote repository...

下载项目时发现如图:

windows下Idea使用git clone failed. Could not read from remote repository..._第1张图片

  • 在使用IDEA下载的过程中就发现了新的问题---根据项目的地址进行下载时提示“clone failed. Could not read from remote repository.
  • 直接翻译是 “远程仓库无法读取”。
  • 无论是github还是gitlab如下方法一样有效!!!

为什么无法读取?

  1. 无法连接服务器?
  • 确认是可以连上服务器的。

     2.idea中git集成中使用的ssh方式问题?

windows下Idea使用git clone failed. Could not read from remote repository..._第2张图片

  • 在解决问题的过程中看到stackoverflow中是让更改“SSH executable” 方式为 Native,试过无效
  • 以上两种都不是,那么很有一种可能没有通过ssh验证链接
  • 所以可以通过创建ssh key 并将产生的id_rsa.pub的内容加到gitlab的后台就可以解决问题了。
  1. 先输入自己的名字和邮箱,如下图:

windows下Idea使用git clone failed. Could not read from remote repository..._第3张图片

    2.生成key

windows下Idea使用git clone failed. Could not read from remote repository..._第4张图片

    3.将生成的id_rsa.pub中的内容添加到相应的git服务器,个人帐号里面。

      4.加key

windows下Idea使用git clone failed. Could not read from remote repository..._第5张图片

windows下Idea使用git clone failed. Could not read from remote repository..._第6张图片

         5.最后重启idea ,再次克隆就好了!!!

  •     注意还有就是,git克隆可能会弹出输入密码的弹框,直接输入密码就好了!!!

         亲测有效哦!!!

你可能感兴趣的:(windows下Idea使用git clone failed. Could not read from remote repository...)