使用https时,git中的其他用户的权限被拒绝

时间:2017-02-07 13:30:11

标签: git ssh

我在尝试推送到我自己说的存储库时遇到错误:

remote: Permission to my_user_name/my_repo.git denied to another_user_name.

我重新生成了SSH密钥,并从我的机器和Github中删除了旧密钥。我还在gitconfig --list中看到我的电子邮件是正确的。

会发生什么?当尝试通过https而不是使用SSH推送时,就会发生这种情况。

1 个答案:

答案 0 :(得分:0)

当您使用HTTPS时,使用SSH密钥进行修改根本没有任何影响,因为您没有使用SSH而是使用HTTPS。看来你以前使用https和another_user_name并且有一些记得这个的凭证助手。有关详细信息,请参阅https://git-scm.com/docs/gitcredentials