700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > git clone failed. Could not read from remote repository

git clone failed. Could not read from remote repository

时间:2020-07-03 03:37:10

相关推荐

git clone failed. Could not read from remote repository

问题:

在使用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自己需要的项目!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。