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

Clarify which account the prompt is for #1472

Closed
carlocardella opened this issue Nov 13, 2023 · 2 comments
Closed

Clarify which account the prompt is for #1472

carlocardella opened this issue Nov 13, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@carlocardella
Copy link

Feature description

Certain tools allow to open multiple repositiries, even from different Git sources (GitHub, GitHub enterprise, Azure DevOps etc.): Credential Manager shold specify which account needs authentication, all I get is this and it is always a pain to find the account I need to login to:

image

This prompt is actually from my GitHub Enterprise account, but the dialog window just says GitHub

@carlocardella carlocardella added the enhancement New feature or request label Nov 13, 2023
@mjcheetham
Copy link
Collaborator

Sadly we're unlikely to be able to fix this 'context' problem as Git itself only gives GCM a small amount of information on the request that needs authenticating.

Git will only provide the protocol and hostname of the remote URL (i.e, "https://github.com") by default.

If you set the credential.useHttpPath setting to true then Git will also provide credential helpers the full path (i.e, "https://github.com/owner/repo") but this has a change in behaviour - GCM will start storing credentials specifically for that full repository URL.. so you'll have separate credentials (and sign-ins) for each repo.


This prompt is actually from my GitHub Enterprise account, but the dialog window just says GitHub

If you are using a GitHub Enterprise Server instance we should display the server hostname, for example:

image

We cannot differentiate between the different GitHub SKUs that are hosted under https://github.com.

@mjcheetham mjcheetham closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2023
@mbailey
Copy link

mbailey commented Feb 6, 2024

The tool should accommodate users with more than one account on a github.

For enhanced security and clarity, it's good practice to use different GitHub accounts for projects across separate security boundaries, such as work-related and personal endeavors. Even github.com itself (and the mobile apps) allow you to login to multiple accounts and switch between them. It also appears having a redundant github account might also be a good idea given they may be randomly suspended.

A user with multiple accounts on github who:

  • sets the credential.useHttpPath setting to true
  • wants GCM to store credentials specifically for that full repository URL

would benefit from knowing which remote they are being prompted for so they can login with the correct account.

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

No branches or pull requests

3 participants