Skip to content

Multiple GitHub accounts in Visual Studio #23843

Multiple GitHub accounts in Visual Studio #23843
Dec 29, 2018 · 8 answers

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 “https://github.com/SamHobbsOrg” 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?

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).

Replies

8 suggested answers

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 = https://github.com/SamHobbsOrg/HerokuFirst.git
	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.

0 replies

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).

0 replies
Answer selected

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 

0 replies

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!

0 replies

Was this resolved? I am still facing this issue.

0 replies

In Windows, If you clear the Windows Credentials (User) under the Manage Windows Credentials, either by removing them or re-authenticating, it would be helpful.

Please let me know if that helped.

0 replies

Github extension offers you to allow sign in using Github… You may choose Cancel to do it manually!! Then you can fill in your username and password in the command palette. "The Screenshot from 2021-03-18 07-12-17

0 replies

There is a feature request for VS you can upvote: Visual Studio Feedback

0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants