Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Options > Git > manage multiple accounts #3707

Open
penCsharpener opened this issue Jan 1, 2018 · 341 comments
Open

Feature: Options > Git > manage multiple accounts #3707

penCsharpener opened this issue Jan 1, 2018 · 341 comments
Labels

Comments

@penCsharpener
Copy link

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.

@joshaber
Copy link
Contributor

joshaber commented Jan 8, 2018

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 joshaber closed this as completed Jan 8, 2018
@anormore
Copy link

anormore commented Apr 1, 2018

@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

@jasonhirstnimble
Copy link

+1 please.
Or a Switch Accounts button.

@paul-vd

This comment has been minimized.

@ncaycedo

This comment has been minimized.

@icklesteve

This comment has been minimized.

@john026
Copy link

john026 commented Jun 25, 2018

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

@vd-tech
Copy link

vd-tech commented Jun 26, 2018

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

@shiftkey
Copy link
Member

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.

@jasonehirst
Copy link

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

@john026
Copy link

john026 commented Jun 26, 2018

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.

@j-f1
Copy link
Contributor

j-f1 commented Jun 26, 2018

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

@jasonehirst
Copy link

jasonehirst commented Jun 26, 2018 via email

@farhan-sauce
Copy link

+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. :-(

@0reo27
Copy link

0reo27 commented Jul 11, 2018

This would be a dope feature to add for sure!

@theclapp
Copy link

theclapp commented Jul 20, 2018

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.

@Rocked03

This comment has been minimized.

@ecobotapp

This comment has been minimized.

1 similar comment
@OpenByteDev

This comment has been minimized.

@hessmjr
Copy link

hessmjr commented Oct 17, 2018

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

@paulshryock
Copy link

paulshryock commented Oct 21, 2018

+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

@rusiano

This comment has been minimized.

2 similar comments
@zhuanqizhirou

This comment has been minimized.

@NLPTOO1

This comment has been minimized.

@MysterieCatGames

This comment has been minimized.

@ghost

This comment has been minimized.

1 similar comment
@sameuser2

This comment has been minimized.

@programming-with-ia

This comment was marked as duplicate.

@faheemstepsharp
Copy link

any update on this matter? it's been 5 years now

@geoidesic
Copy link

Is there a work-around? I.e. it's possible to add another account to an organisation as an admin. So potentially you can log in to your second account, create an organisation and invite your primary account as an administrator?

@khrnchn
Copy link

khrnchn commented Aug 23, 2024

up. quite tedious for me to switch between work and personal accounts. every time I switched to a work repo, I had to open options > sign out > sign in via browser.

@steveward
Copy link
Member

From #19157:

It would be nice to be able to set git credentials (user, email, psw/token) for each repo.

Very useful to people working on different projects with different github users

@rcroft-work
Copy link

+1 for this feature

I have 3 GH accounts: a personal account, a work (public) account, and a work (internal) account.

I switch between them a lot and the experience (in general) isn't great (involves workarounds/etc). The GH CLI has support for this functionality and this feels like a pretty large feature gap for the GH Desktop app not to support multiple accounts.

@khrnchn
Copy link

khrnchn commented Aug 30, 2024

+1 for this feature

I have 3 GH accounts: a personal account, a work (public) account, and a work (internal) account.

I switch between them a lot and the experience (in general) isn't great (involves workarounds/etc). The GH CLI has support for this functionality and this feels like a pretty large feature gap for the GH Desktop app not to support multiple accounts.

yeah I have just tried out GH CLI, they have nice commands

@faheemstepsharp
Copy link

Github Desktop needs to focus on add multiple account support, better AI based commit messages and A more visual and animated feel(optimistic UI)

@Yarflam
Copy link

Yarflam commented Sep 3, 2024

[...] better AI based commit messages [...]

What? Why? The names of the commits must be identified by you, for you.

@pituluk
Copy link

pituluk commented Sep 4, 2024

Github Desktop needs to focus on add multiple account support, better AI based commit messages and A more visual and animated feel(optimistic UI)

No, AI everywhere is cancer

@devops-at-alinea
Copy link

This is sorely needed, seems like such a basic function I can't believe it hasn't been added yet (after 5 years). It makes the GitHub desktop pretty much useless unless you're a hobbyist or chained to a work machine.

@sergio-gn
Copy link

I need this feature as well. I have both a client account and a personal account for different projects, and I've accidentally committed personal changes using the client account multiple times, which isn't professional. I’d like to avoid asking for the client's 2FA code every time I need to commit something because I had to log out to make personal commits.

@Xonatron
Copy link

Xonatron commented Sep 8, 2024

It would be nice to elegantly switch accounts and see the repos only for each account. To keep a developer's mind space in the right project / company.

@Hjarpe
Copy link

Hjarpe commented Sep 12, 2024

This is a sorely needed feature, bump!

@tyVandeZande
Copy link

GUYS!!!! The feature has been confirmed and added!!! FUlly working. 5 years since this chain started and (at least) a decade after the normalization of multiple accounts, MS has answered our prayers!!! Thank you. Thank you.

@Husain01
Copy link

GUYS!!!! The feature has been confirmed and added!!! FUlly working. 5 years since this chain started and (at least) a decade after the normalization of multiple accounts, MS has answered our prayers!!! Thank you. Thank you.

Source? @tyVandeZande

@hitecSmartHome
Copy link

GUYS!!!! The feature has been confirmed and added!!! FUlly working. 5 years since this chain started and (at least) a decade after the normalization of multiple accounts, MS has answered our prayers!!! Thank you. Thank you.

Without announcement? Link?

@Clicketyclick
Copy link

In the version of september 12th your login name has a dropdown with "Switch dashboard context".
I had to use a SMS to verify login for the first time.
Works fine with dynamic switch between profiles.
"A small step for man - a gigant leap for mankind!"

@Clicketyclick
Copy link

Clicketyclick commented Sep 14, 2024

In the version of september 12th your login name has a dropdown with "Switch dashboard context". I had to use a SMS to verify login for the first time. Works fine with dynamic switch between profiles."

It's the Android version and web version, but not in the Windows app (Version 3.4.5 (x64) or Version 3.4.6-beta1 (x64))

@programming-with-ia
Copy link

programming-with-ia commented Sep 14, 2024

In the version of september 12th your login name has a dropdown with "Switch dashboard context". I had to use a SMS to verify login for the first time. Works fine with dynamic switch between profiles."

It's the Android version and web version, but not in the Windows app (Version 3.4.5 (x64) or Version 3.4.6-beta1 (x64))

everyone knows. but need for windows app

@ThermoMan
Copy link

Who the heck does development on a phone?
Still, if the code is there, how long until it's in a useful version of the app?

@tyVandeZande
Copy link

Who the heck does development on a phone? Still, if the code is there, how long until it's in a useful version of the app?

The planned release will be 4.1.2025. So Close.

@faheemstepsharp
Copy link

We have been asking for YEARS for this KINDLY @github so somehing instead of FIXING BUGS!!! make new features aND UI UX

@RobertSiwy
Copy link

i want to come back to the original request ##11797 from https://github.com/j3p0uk:

Describe the feature or problem you’d like to solve
I have multiple distinct GitHub Enterprise servers that I interact with. I would like to be able to configure all of them to be used via GitHub Desktop.

Proposed solution
All GitHub Desktop users will be able to interact with multiple GitHub Enterprise servers, which is not unusual in a large company.

It is open for three and a half year!
Please check the possibility to implement! Nowadays it's evaen more usal in big companies to have multiple GitHub Enterprise servers!
Thank you in advance!

@the-rockkk
Copy link

In the version of september 12th your login name has a dropdown with "Switch dashboard context". I had to use a SMS to verify login for the first time. Works fine with dynamic switch between profiles."

It's the Android version and web version, but not in the Windows app (Version 3.4.5 (x64) or Version 3.4.6-beta1 (x64))

This request is for the Desktop app. The feature has been on the web version for a long time. TBH I didn't realize there was an Android version.... LOL

@jordiup
Copy link

jordiup commented Sep 24, 2024

keeps getting buried lol, but here it is 👇

Link to solution

@OwaliShawon
Copy link

I think this feature is much needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests