首页 > 其他 > 详细

git clone failed. Could not read from remote repository

时间:2018-11-17 12:36:43      阅读:1099      评论:0      收藏:0      [点我收藏+]

问题:

  在使用git克隆gitee或者github上面的项目时,能够连接上却无法下载下来!

解决:

       1、在本地打开git bash 运行  

         检查是否有设置账户名

      git config user.name

      如果没有,设置账户名

      git config --global user.name "git账户名"

   生成ssh公钥和私钥,直接enter就可以,注意记下位置(找到id_rsa.pub文件)
      ssh-keygen -t rsa -C "git账户名"

      技术分享图片

  2、打开gitee,进入设置--->ssh公钥(github也是一样的操作  settngs--->SSH and GPG keys)

      创建公钥,将id_rsa.pub文件内容填入

       而后就可以clone自己需要的项目!

  
      

 

git clone failed. Could not read from remote repository

原文:https://www.cnblogs.com/alexPeng/p/9973436.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!