我正在建立一个新的git存储库,以应对由潜在雇主发送给我的编码挑战。我正在使用新计算机(Mac OSX);但是,当我尝试使用HTTPS从命令行推送现有存储库时,出现错误消息:
remote: Permission to afriedman1991/PS_Change_Log_Notifier.git denied to scratchbenchmark.
fatal: unable to access 'https://github.com/afriedman1991/PS_Change_Log_Notifier.git/': The requested URL returned error: 403
Benchmark是我曾经工作过的公司,它使用SSH来管理他们的项目。由于某些原因,git认为即使我的来源设置为:
,我仍在尝试推送到其存储库origin https://github.com/afriedman1991/PS_Change_Log_Notifier.git (fetch)
origin https://github.com/afriedman1991/PS_Change_Log_Notifier.git (push)
一段时间以来,我一直在试图找出解决方法,但似乎找不到有效的解决方案。有人可以帮忙吗?
答案 0 :(得分:0)
检查您的凭据助手是否缓存了错误的凭据
git config credential.helper
如果是“经理”,则可以“ sign out in the Git Bash console in Windows”。
git credential-manager reject https://github.com
在Mac上,对于osxkeychain,请参阅“ Updating credentials from the OSX Keychain”
git credential-osxkeychain erase https://github.com
然后重试:它将提示输入用户GitHub用户名/密码。