在VSCode中更改Git帐户 [英] Change Git Account in VSCode
问题描述
在同步更改时,我不小心从VSCode第一次尝试从旧的github帐户输入凭据(凭据适用于旧帐户,但我想使用新帐户).
I accidentally entered the credentials form an old github account the first time VSCode tried to connect when synchronizing my changes (the credentials were right for the old account, but i would like to use the new account).
现在,我找不到更改帐户的方法.已经尝试过卸载/安装,但是VSCode会不断修改我的登录名.
Now I cannot find a way to change my account. Already tried uninstall/install, but VSCode keeps remeberming my login.
有什么想法如何刷新给定的帐户吗?
Any ideas how to refresh the given account?
推荐答案
git config --global --unset credential.helper
这将为您的系统取消设置git凭据,现在您可以使用新的凭据,然后为git启用缓存
this will unset the git credentials for your system, Now you can use your new credentials and then enable the cache for git
git config --global credential.helper wincred
git config --system credential.helper wincred
这将再次启用缓存以保存git密码
this will again enable the cache for saving git password
这篇关于在VSCode中更改Git帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!