在Visual Studio Code中更改git用户 [英] Changing the git user inside Visual Studio Code

查看:721
本文介绍了在Visual Studio Code中更改git用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的git commit的用户已更改,但是我无法在Visual Studio Code中更改它.

The user for my git commits has changed, but I am not able to change that inside of Visual Studio Code.

我在git中更改了全局设置,但是当我想在新存储库中通过Visual Studio Code推送或同步时,出现错误,提示 oldusername 无权推送到 newrepository .在这一点上,这不是许可.用户名的更改不适用于Visual Studio代码.当我使用终端时,我可以推动.这也不是允许 olduser 推送到 newrepository 的解决方案.

I changed the global settings in git, but when I want to push or sync via Visual Studio Code inside my new repos I get the error that the oldusername has not the permission to push into newrepository. At this point it is not the permission. The change of the username did not work for visual studio code. When I use the terminal I can push. It is also not a solution to allow the olduser to push to the newrepository.

我使用的是Windows10.因此所有其他工具都可以使用,但是仅凭Visual Studio Code,我无法更改用户.

I am on Windows 10. So all other tools are working, but just at Visual Studio Code I was not able to change the user.

欢迎任何推荐.

推荐答案

我通过在Git中设置电子邮件地址解决了此问题:

I resolved this issue by setting an email address in Git:

git config --global user.email "email@example.com"

这篇关于在Visual Studio Code中更改git用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆