Multiple GitHub accounts in Visual Studio

I have read Authenticating to GitHub but I do not understand how to use another GitHub account.

I try clicking on Manage Connections; I assume that “Connect to a project…” is not for GitHub. When I do “Connect to GitHub” the GitHub button is disabled and I assume I don’t have GitHub Enterprise. I cannot get that to work. I tried putting “” into the server addres but I am not surprised that that does not work.

When I click on “Create” under “GitHub” I (think I) see a drop-down for selecting a GitHub account; am I correct that that is what that drop-down is for?

Is there support for more than one GitHub from VS? Oh, I realize it is actualy an extension (right) but it is provided with VS by default, right?

Something else I have tried is to add the following to the config for a small test project/repository. VS has not asked me to authenticate this account but maybe it will later. If so then this is an indirect way to do it.

[remote "HerokuFirst"]
	url =
	fetch = +refs/heads/*:refs/remotes/HerokuFirst/*

I have also overriden the user name in the config file but I will be very surprised if that makes a difference.

Okay, I found it. In the Connect window for GitHub there is a “Sign Out” link. I used that and then I was able to sign into this account (that I am posting this from).

1 Like

but then… when you sign in github later… trought the team explorer; it again uses the other - maybe default account - not your last account you have signed in. this causes the situation like : your next git commit sync with other account’s… 
so. your issue not complated 

Hi! I’m having this problem you mention. I signed into account XX then wanted to log out, so I signed out from XX (through user icon in VS). After that I signed in with YY account and when I want to commit, it does with XX account.
Do you know how to solve it? I want to commit with YY account. Thanks!