remote: Permission to myUsername/MyProject.git denied to Dwannnn.
fatal: unable to access 'https://github.com/joshuakimDwan/MyProject.git/': The requested URL returned error: 403
我的终端出现此错误。
我的步骤是:
1. git初始化
2. git远程添加原点https://github.com/myUsername/MyProject.git
3. git add README.md
4. git commit -m "第一次提交"
(错误)5. git push -u origin master
当 git push 时,我收到了这个错误。这意味着不能允许“Dwannnn”。但是,在 ~/.gitconfig 中,我的用户名不是“Dwannnn”。我不知道叫什么名字。
据我猜测,我在使用 Sourcetree 练习 Git 时使用了名为“Dwannnn”的帐户。所以,我删除了Sourcetree的帐户、网络数据。但是,这不起作用。
总而言之, 我将我的 Github 用户名和 userremail 放入我的 .gitconfig 文件中,但收到消息说我无法使用我不知道的帐户进行访问(我只能猜测)
我应该怎么做才能解决这个问题?
非常感谢
最佳答案
问题来自Windows Credential Manager,您只需删除Windows Credential中的git帐户即可。我认为它会起作用。
控制面板——>用户帐户和家庭安全——>管理Windows凭据——>删除github帐户
关于git - (Github) 远程 : Permission to username/MyProject. git 被拒绝 ($unknown_account),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43573464/