git - 在 VSCode 中更改 Git 帐户

标签 git visual-studio-code vscode-settings

VSCode 在同步我的更改时第一次尝试连接时,我不小心输入了旧 github 帐户的凭据(凭据适用于旧帐户,但我想使用新帐户)。

现在我找不到更改帐户的方法。已经尝试卸载/安装,但 VSCode 一直在记住我的登录信息。

关于如何刷新给定帐户有什么想法吗?

最佳答案

git config --global --unset credential.helper

这将为您的系统取消设置 git 凭据,现在您可以使用新凭据,然后为 git 启用缓存

git config --global credential.helper wincred
git config --system credential.helper wincred

这将再次启用缓存以保存 git 密码

关于git - 在 VSCode 中更改 Git 帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44604446/

相关文章:

visual-studio-code - 在 VSCode (Windows) 的行首添加多个光标?

javascript - 如何让 VS Code 的 Intellisense 与 AngularJS 的注入(inject)服务一起工作?

visual-studio-code - 在 Visual Studio Code 上集成 ZSH 时出现字体问题

visual-studio-code - 自定义shebang的VSCode语法高亮

go - VsCode Go 扩展调试 Example_c.c 文件而不是实际文件

git - 如何在 git 中 merge 其他人项目的 pull 请求?

Git SSH 访问设置问题

node.js - 在 VS Code 中调试 Angular Universal Starter App 的服务器端不起作用

git - 如何让 git 读取模式更改?

git - Docker 从 git repo 运行命令?