you do not have permission to pull from the repository解决方法

使用git进行项目的版本管理,换了台电脑,配置了账号和邮箱后,pull一个私有项目的时候,发现一个问题:

you do not have permission to pull from the repository解决方法

原因分析: 

这是由于没有设置Gitee的SSH公钥。在未设置SSH公钥的情况下,可以使用git clone Gitee上的项目,但是不能git push项目到Gitee上,如果想push项目到Gitee,那么必须配置SSH公钥。生成公钥和配置公钥的办法,可以参考Gitee帮助里面的文章,里面做了详细的介绍https://gitee.com/help/articles/4191 。比你在百度里面不知所措的遨游强多了。

解决办法:

1、生成SSH公钥

ssh-****** -t rsa -C "[email protected]"

you do not have permission to pull from the repository解决方法

2.查看生成的公钥

cat ~/.ssh/id_rsa.pub

you do not have permission to pull from the repository解决方法

3.找到git进行配置

you do not have permission to pull from the repository解决方法

 这里添加之后,在git push 的时候,发现还是会:

you do not have permission to pull from the repository解决方法

可能是你的这台电脑以前使用过git,所以保存的账号和密码是其他人的,所以需要进行修改账号和密码:

(一)进入控制面板

you do not have permission to pull from the repository解决方法

(二)选择用户账户

you do not have permission to pull from the repository解决方法

(三)选择管理你的凭据

you do not have permission to pull from the repository解决方法

(四)选择Windows凭据

you do not have permission to pull from the repository解决方法

(五)选择git保存的用户信息

you do not have permission to pull from the repository解决方法

(六)选择编辑或者进行删除操作

you do not have permission to pull from the repository解决方法

(七)完成

you do not have permission to pull from the repository解决方法