Change GIT account of Visual Studio Team Explorer

本秂侑毒 提交于 2019-12-02 17:51:53

Look in the Windows Credential manager and remove/update your credentials there:

In my case just removing credentials from Windows Credential didn't fix it. I first removed all git and azure related accounts from Windows Credential, then removed accounts from VS>Files>Account Settings, and then VS asked me new credentials and connected to the project. But my commits were still made with the old account! Finally I found out that it was the git config:

C:\Users\[USER NAME]\.gitconfig

I deleted the whole user section in that file which looks like this:

[user]
    name = [OLD ACCOUNT NAME]
    email = [OLD ACCOUNT EMAIL]

On next commit VS asked me git account information and done.

If you want to work with different accounts for different projects on same machine, read this.

I am using VS 2017 and this is how I updated my Password for TFS, using Git repository.

  1. From the Menu: Team -> manage Connection
  2. Click on Manage Connection Link -> Connect to Project

It will then open window to connect to your project, here you can update your password.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!