如何更改Github本地repo.git/config凭据以绕过403?
我正在尝试从设置了其他凭据的工作PC推送到我的远程Github存储库,这是我得到的:如何更改Github本地repo.git/config凭据以绕过403?,git,github,visual-studio-code,vscode-settings,credentials,Git,Github,Visual Studio Code,Vscode Settings,Credentials,我正在尝试从设置了其他凭据的工作PC推送到我的远程Github存储库,这是我得到的: remote: Permission to *** denied to ***. fatal: unable to access 'https://github.com/***': The requested URL returned error: 403 我试图更改.gitconfig,但没有效果 我怀疑VS代码不知何故记住了工作凭证,但我找不到它在哪里。找到了答案。最后,这与重置VS代码凭据无关 在rep
remote: Permission to *** denied to ***.
fatal: unable to access 'https://github.com/***': The requested URL returned error: 403
我试图更改.gitconfig
,但没有效果
我怀疑VS代码不知何故记住了工作凭证,但我找不到它在哪里。找到了答案。最后,这与重置VS代码凭据无关
在repo目录下和[远程“源”部分下找到.git/config
文件
https://my-username@github.com/my username/my repo.git
到
ssh://git@github.com/my username/my repo.git
在那之后,我能够毫无问题地向上游推进。我不太明白为什么,但它起作用了