[ISSUE]Error: Permission to user/repo denied to other-user

机器甲上曾经使用过一个私人github账号A,并且添加了ssh验证

后来为了公共开发,又创建了一个github账号B,提交的时候发现出现错误: remote: Permission to user_B/xxx.git denied to user_A

使用git config, git log 查看用户名都是账号B

github上的解决方法(https://help.github.com/articles/error-permission-to-user-repo-denied-to-other-user/)不适合,因为该项目是B创建的,并不属于A 

按照https://help.github.com/articles/generating-ssh-keys/ 方法重新创建,还是一样的错误

最后尝试将https 换成 git (https://help.github.com/articles/changing-a-remote-s-url/)

git remote set-url origin git@github/...

正确提交

 

17:09 2015/3/29

问题是多个github账户的冲突, 清除所有github账户上的 ssh key,按照如下教程重新建立 ssh-key

http://code.tutsplus.com/tutorials/quick-tip-how-to-work-with-github-and-multiple-accounts--net-22574

http://superuser.com/questions/272465/using-multiple-ssh-public-keys 

posted on 2015-01-24 23:38  影语者  阅读(4928)  评论(0编辑  收藏  举报

导航