Desktop: Feature: Options > Git > manage multiple accounts

Created on 1 Jan 2018  Â·  103Comments  Â·  Source: desktop/desktop

It would be great to be able to manage multiple git credentials in the options.
Additionally it'd be nice to set an git credential override for each repository.

Otherwise when a user works with personal and work related accounts they always have to change between the accounts.

enhancement future-proposal

Most helpful comment

+1 please.
Or a Switch Accounts button.

All 103 comments

Thanks for the suggestion!

This idea is interesting for the future, but this is beyond the scope of our current roadmap.

I'm going to add the future-proposal label to this issue and close it out, so that we don't get overwhelmed with our backlog! We'll revisit these as part of our next planning session.

@joshaber -- Until then, can we get a button to quickly sign out / manage accounts? I understand it's not roadmap, so even a keyboard shortcut would be sweet.

CTRL + SHIFT + O?

image

+1 please.
Or a Switch Accounts button.

+1 please

+1 this would be a great feature

+1

+1 so badly need this as independent contractor working with multiple agencies and clients, all who want separate accounts

If you know how to use the terminal commands for git you could use the following i have a nice setup using this with multple accounts SSH Keys with Multiple GitHub Accounts

Just don't miss this step else you might have a hard time with the setup
Registering your new SSH Keys New keys need registered before they are useful. To register, we need to use ssh-agent and to use that, we need to first make sure it is running:
eval "$(ssh-agent -s)"

There's a few technical constraints off the top of my head that need to be dealt with alongside the UI/UX concerns for multiple account support:

  • permissions to a repository - we detect and infer a GitHub repository through the API, but the API won't return the permissions hash unless you're already authenticated, so we need to have some way to associate accounts with repositories locally
  • storing the right credentials - I think this area is fine
  • passing the right credentials to Git - again, our GIT_ASKPASS script should handle this because it can already differentiate between your GitHub and GitHub Enterprise accounts, but we'd need to teach Desktop to be smarter about looking up who "owns" a GitHub repository
  • this is all specific to HTTPS remotes - SSH is a different beast, and we don't do any work to setup your SSH environment currently from within Desktop

Putting all that aside, I'd like to understand more about the situations why people are using multiple accounts? Things that have been mentioned here:

  • "having separate accounts to differentiate between personal and work projects"
  • "each client wants a different account to grant access to the repository"

For reference, GitHub supports outside collaborators as a way for organizations to add users to specific repositories, without needing to add them to a team and granting them too much access to the organization.

I work with three GitHub accounts from three emails.
One is my personal account for my own projects.
The other two are both corporate accounts where I have been required to join each organisation at GitHub.
I'm getting bored with regularly performing two factor...

i'm required to create accounts using the email of the organisation. they will only grant access to accounts registered using the company email... it's their "policy"... not a choice.

since i work for multiple organisations (often during the same day), i can be required to switch between repos and accounts.

using github desktop this means logging out everytime i have to switch projects.

@john026 Is it possible to add all your email addresses to one account?

I'm in the same boat and no it's not possible to amalgamate the accounts.

GitHub needs this feature.
I can switch accounts with Gmail, Amazon and so on.. seems useful...

On Tue, Jun 26, 2018, 18:21 Jed Fox notifications@github.com wrote:

@john026 https://github.com/john026 Is it possible to add all your
email addresses to one account?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/desktop/desktop/issues/3707#issuecomment-400395626,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHg3VmubweHb05r2ixl9Xq_oaC99DHsyks5uAm2bgaJpZM4RQBu3
.

+1 This feature is in high demand.
It's sad to know that even after 6 months there is no further planning to include this feature. :-(

This would be a dope feature to add for sure!

This has worked for me so far (for all of five minutes), and is a variation on the old "use a different browser to manage a different identity" advice:

  • Use Chrome
  • Create a "new person". Settings -> manage other people -> add person.
  • With that person, login to GitHub as whoever you'd like.
  • Repeat for as many GH identities as you need, I guess. I only have two, so YMMV there.

Edit: I didn't realize this issue was for the GH desktop client, sorry. Please thumbs-down if you'd like this comment deleted.

This would be very helpful for me, as I use two accounts that I keep separated for personal and internet things

+1

+1

+1

  • Git Tower currently offers this and its one of the main reasons I haven't moved away from it.
  • I currently have a personal account, a business account, plus an enterprise account from grad school. None of those are optional and I can't imagine logging in and out between them as often as I switch. I was recently reviewing Github Desktop to see if this feature was added and its going to continue to hold me back. Otherwise would love to switch.

+1

I frequently use both a personal account and a contractor account for a client.

Right now I have to follow this full process, just to switch accounts:

  1. Open GitHub Desktop > Preferences
  2. Accounts > Log out of personal account
  3. Accounts > Log into contractor account
  4. Open GitHub Desktop > Preferences again, _since it closed automatically_
  5. Git > Update Email and Save
  6. Close GitHub Desktop
  7. Re-Open GitHub Desktop _(in order for Git Email to be truly updated)_

If I don't follow all of these steps, then my commits are made by the wrong email address, and therefore the wrong GitHub account.

I would love to easily:

  1. Switch between accounts
  2. Switch between Git Email
  3. Not have to close and reopen GitHub Desktop

It would also be nice to:

  1. Change multiple things in Preferences without the window automatically closing before I'm done

Edit:

Actually, after some trial and error, I have a pretty simple workflow for switching accounts. Since my personal account is a GitHub.com account, and my contract account is an Enterprise account, I'm able to leave those both signed in at the same time.

The only thing I need to change is _which account is signing the commits_. So when I'm switching between personal and contractor work, here's my simplified workflow:

  1. Press cmd + , to open Preferences
  2. Click Git
  3. Update my email address and click Save
  4. Switch to a different (or the same) repo; then my profile avatar changes

+1

+1

+1

+1

If multiple other clients can do this, why can't the first-party client? I just don't understand what kind of logic went into pushing this decision to the back burner.

+1

+1

Agreed. I just ran into this myself. I am told that officially, GitHub only allows one account per person, but as the thread shows, there are perfectly good reasons for having multiple accounts, and the rule is not enforced. GitHub and GitHub Desktop need to recognise this and implement a better workflow.

+1

+1 Highly needed feature when we have two different accounts for personal as well as work related Github repos.

+1

+1

+1

+1 - This is needed

+1 definitely still needed

+1 please add this

+1 still useful, and also please contractually allow more than one account per person. I'd really, really like to have one personally and one for more public-facing things.

+1 please add this

+1 This would be very helpful

+1 would really like this. Currently using an incognito browser as the solution. Not ideal.

+1 will be useful

+1

+1

+1

Adding to this list of requests. Is it so uncommon to have and use two concurrent github accounts ? I have multiple GitHub accounts and would like to use them concurrently.

+1
This is the biggest inconvenience for me at the moment, otherwise I like Github Desktop a lot!

+1

+1

Forced to use multiple non-enterprise github accounts, I would love a simple way to switch between them.

I ran into this too but maybe I don’t have to, can i have two repos under the same account that would have separate domains as github pages?

+1 pls

I ran into this too but maybe I don’t have to, can i have two repos under the same account that would have separate domains as github pages?

@sk3pt1c you can have as many GitHub Pages repositories in your account as you would like, but you can only have one _user_ page. You could create separate _project_ pages and use custom domains for them. See this guide for more info. If you have any other questions about GitHub Pages I'd recommend contacting GitHub support.

I ran into this too but maybe I don’t have to, can i have two repos under the same account that would have separate domains as github pages?

@sk3pt1c you can have as many GitHub Pages repositories in your account as you would like, but you can only have one _user_ page. You could create separate _project_ pages and use custom domains for them. See this guide for more info. If you have any other questions about GitHub Pages I'd recommend contacting GitHub support.

Thanks, that's what i ended up doing, a different repo with its own domain, seems to work fine. thank you!

+1

+1

Hi folks, thanks for weighing in on why this is important to you. It's not part of our near-term plans, but we do recognize that it would likely be valuable for many people who are forced to have multiple accounts. All issues labeled future proposal are still under consideration for potentially being reopened, and there are 40 left that we'll continue to work through until issues are either open or closed as a way to signal whether we intend to support them at some point. Thanks again and appreciate your patience.

@staabm said in #7830

I have 2 separate github.com accounts, one for personal and one for enterprise use.

it would be great if I could somehow use multiple github.com accounts at once, or at least be able to start the application with different "profiles" or similar, so I can work with both accounts, without "sign out" -> "sign in" workflows a few times a day.

I have 3 different github accounts (personal / company I work for / clients) in use at the same time, just used the Clone URL option (CTRL - Shift - O), select URL tab and enter the hub name and repo (hub name/repo) and clone locally, if you have access then it is available as a repository for you to push / pull code.

You can check that it is connected to the correct account in the Repository > Repository Settings where it shows the full URL.

Have done this on two different laptops (personal & work) where I have all projects available if needed for reference.

If anyone is listening... Yes, this is a highly desired feature. If you tell me where to start I'll write it myself.

My use case is similar to the bazillion others who have posted before me, with a multiplier. I am a developer evangelist and I work with a large variety of partners, many of which I need dedicated accounts for.

This feature has been requested repeatedly for over a year, and here I am requesting it again; What gives?

@billygriffin @shiftkey This could likely be done in a day or two by someone intimate with the codebase. Can you just appease the mob and sneak it in the roadmap?

In my company, we have multiple GitHub Enterprise Server instances running. Would it be possible to also cover this? So to also add multiple GitHub Enterprise Servers?
Or shall I open up a new issue as it is out of scope of this one here?

@biolauri No need to open a new issue. Not sure if it will cover this situation, but we now have a reminder to consider it when the time comes to scope out the requirements. Thank you.

I know it's probably not easy to implement, but i think Github Desktop really needs this feature.
I have two accounts with 2FA and its annoying to log in with a Personal Access Tokens. If i could have two Github accounts logged in at the same time i could just use the builtin Github 2FA Verification setup for both accounts and wouldn't have to worry about 2FA.

Feedback from https://github.com/desktop/desktop/issues/8859:

Currently, a user is only able to sign in to a single standard account and a single enterprise account at a time.

However, for freelancers like me - who need to sign into multiple different company accounts per day, the mind numbing task of repeatedly signing in and out can be tiresome.

+1 please!

+1, I am at university and would love to have the ability to easily switch between my hobby account, my real account, and my college account.

+1 for this. I'm a consultant and need to access repos for multiple different clients. Many of which are legacy codebases that we don't own the IP for so there is no way we can just use our org email addresses. Then there is also my personal account on top of this. I've to do multiple login/logouts each day which is a pain and a time sink.

+1 please

+1 for this

Putting in for this. Would love to have multi-account support in the app.
There is a bit of a workaround in Windows for this:
-Create another account for the additional GitHub account you want to add.
-Find the GitHub Desktop icon, Shift + Right Click it and "run as a different user" and run it as that user. It will open another instance of GitHub Desktop and let you add another account.

Can we get an update on this? This is a big headache :(

Requested in #9536:

I have multiple GitHub accounts, one for school (nonenterprise) and one for my own personal use. Whenever I want to try to change between accounts I need to sign out of my previous account and then sign in to my new one back and forth.
I was wondering if it would be possible to make the switch easier, like have the program remembers the login credentials of the previously logged in users. You would see a list of currently logged in users and you would just be able to select that user to switch. Next to the user "card", you would also have a logout button so that you can log that user out.

Why is this issue closed? The last comment links a new issue stating it is being tracked here. May I know the timeline of this being available?

i like to have this feature too

Please implement

Agreed, this is a needed feature. Also wondering why this issue has been closed.

+1 Please implement multiple accounts

@joshaber
I understand the roadmap-related reasons for closing this ticket but I think the people in this thread would appreciate knowing the plans, myself included.
Can we track future proposals or will they realistically end up postponed indefinitely?

Thanks @jasonhirstnimble for the nudge. I totally appreciate that it can feel frustrating just being in the dark. We try to update any issues we're planning to work on in the coming months when we've decided on them, and this isn't in our immediate plans. I would say that it's highly unlikely that this will be done in the next six months, and beyond that I can't say. With this issue in particular, there's also the added complexity that GitHub encourages one account per user with multiple associated email addresses and permissions. That said, I totally understand that for some people, they're required to have multiple accounts so I'm certainly not trying to discount the problem. There's documentation on how to merge accounts here, for those in situations where multiple accounts are not explicitly required: https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/merging-multiple-user-accounts

I know that's likely not a satisfying answer, but I did want to provide more clarity. And thanks for asking specifically. If this is something we plan to do in the near or intermediate term, we'll update the issue to let folks know.

Thanks for your hard work guys, this feature will really make our lives easier

Sorry if this has been posted already. The workaround I use is to change the repositories I want to use my alternate account to use that email address.

git config user.email [email protected]

Then edit ~/.ssh/config to use a different key file for host username.github.com than github.com

Host username.github.com
   HostName github.com
   User git
   IdentityFile ~/.ssh/id_rsa_username

Then, when I clone a repo, instead of using the default URL change the url to use that host

git clone [email protected]:username/repo.git

For existing repos you can change the remote's URL instead:

git remote set-url origin [email protected]:username/repo.git

Sometimes when I switch to the repo that's configured to use the alternate account GH Desktop warns me that I don't have write access, but I can still click commit and then the warning goes away.

+1 Adding myself to the list of people who would really like to have this. I was searching around in the GUI trying to see something that I knew must be possible until I found out that... it isn't.

Please add quick profile switching. I have business and personal accounts, please add

+1

Is there any chance for this to get re-opened? Seems like many people would like it to be added to the roadmap.

This feature would be very practical any chance of a soonish implementation?

I even made a tweet to github, they said they passed it on to engineering team a few months back, but seems like nothing yet

Would love to see this feature implemented. Have two accounts as one is personal and the other is for another purpose.
Please consider adding this!

We really need this on Desktop or Webside for quick switch the different account. For the Desktop we also need the local settings will change by different accounts.

+10

+1

I have a work account and a personal account and I would also like to be able to switch between the two

This would be so helpful! I work with two companies that want me to use their "own" accounts, a personal account, a business account, and a client account I manage.

+1

+1

This is a goal focused feature we should definitely have it

I'm unsubscribing from this thread. To all that follow.. it's been TWO YEARS and they haven't done this. It is not happening. I'm using source tree now and I'm tired of getting the emails when this thread gets updated. I had enough. Good luck. Thanks for all the fish.

Dont know who needs a solution now, but I worked on some code from @smallfoxx ( https://github.com/smallfoxx/Tools )
and made it a bit simpler to switch with just 1 bat file on my start menu (on windows)
https://github.com/harshvardhanmalpani/Tools/tree/master/GitHub

  1. run gitswitch.bat (helps you create alternate profile using original file "SwapGitHubProfile.ps1" - -> Many many thanks to @smallfoxx again)
  2. then run step2.bat (creates a shortcut in start menu)

As individual person, it's still valid to have different accounts for different purposes.
Switching account is essential in this case.

This is my delima here, my Team and I are working on a project in the office, I am managing the GitHub account of my team, I occasionally switch between signing in with my personal account and the team's GitHub account, where as n GitHub desktop I set it up with my personal account, I have signed out and signed in with the team's account (which is an organization, but the repos I can access are those in my personal account only, I really hope there is a way to resolve this, wondering if it is possible to add accounts the same way it is done on Gmail.

need this as well. bump.

Bump!

Bump!!

Could we all please stop commenting Bump! Theres a feature called reactions and they're made for exactly this purpose. Ya'll wanna know how your comments will look like in a few weeks? They'll be marked as off-topic or hidden by GH cuz they look like spam and add nothing to the conversation AT ALL. Upvote the initial question to show your interest and comment if you have something to add jeez.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlcaDesign picture AlcaDesign  Â·  69Comments

cheshire137 picture cheshire137  Â·  52Comments

shiftkey picture shiftkey  Â·  60Comments

hmtxz picture hmtxz  Â·  242Comments

decabeza picture decabeza  Â·  63Comments