Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何更改Github本地repo.git/config凭据以绕过403?_Git_Github_Visual Studio Code_Vscode Settings_Credentials - Fatal编程技术网

如何更改Github本地repo.git/config凭据以绕过403?

如何更改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

我正在尝试从设置了其他凭据的工作PC推送到我的远程Github存储库,这是我得到的:

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

在那之后,我能够毫无问题地向上游推进。我不太明白为什么,但它起作用了