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

The manage multiple accounts docs aren't accurate on what happens #24559

Closed
1 task done
jessehouwing opened this issue Mar 20, 2023 · 9 comments · Fixed by #25243
Closed
1 task done

The manage multiple accounts docs aren't accurate on what happens #24559

jessehouwing opened this issue Mar 20, 2023 · 9 comments · Fixed by #25243
Labels
account-and-profile Content relating to account and profile content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review

Comments

@jessehouwing
Copy link
Contributor

Code of Conduct

What article on docs.github.com is affected?

https://github.com/github/docs/blob/main/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/managing-multiple-accounts.md

What changes are you suggesting?

This doc mentions that for each local folder the credential manager will ask for an access token, but I don't think this is true. For each clone URL it will ask for a credential, but if you clone the same repo twice on the same machine, it shouldn't care if the clone was made into 2 separate folders.

Additional information

The useHttpPath property uses the clone url to store the access token. It doesn't care about the local working folder.

@jessehouwing jessehouwing added the content This issue or pull request belongs to the Docs Content team label Mar 20, 2023
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Mar 20, 2023
@ANKIT-desigh
Copy link

there may be possible that the user may have locked or change the passsword

@cmwilson21 cmwilson21 added waiting for review Issue/PR is waiting for a writer's review account-and-profile Content relating to account and profile and removed triage Do not begin working on this issue until triaged by the team labels Mar 21, 2023
@cmwilson21
Copy link
Contributor

@jessehouwing Thanks so much for opening an issue! I'll triage this for the team to take a look 👀

@dawncharles85

This comment was marked as resolved.

@Saeidnasiri

This comment was marked as spam.

@Saeidnasiri

This comment was marked as spam.

@isaacmbrown
Copy link
Contributor

isaacmbrown commented Apr 26, 2023

Hi @jessehouwing, thanks for submitting this issue!

I'm just working out exactly which steps you'd be looking to update here.

Are the following steps the ones that are looking inaccurate?

Step 4:

To configure Git to cache credentials for each local directory where you clone a repository, enter the following command

Step 6:

Git will cache the personal access token for the directory you're in

And you would suggest we update to something like the following?

Step 4:

To configure Git to cache credentials for each repository you clone, enter the following command

Step 6:

Git will cache the personal access token for the repository you're in

If so, I'd expect this isn't causing too much confusion for most users, but if you would like to open a PR to fix this, then feel free to go ahead and we'll get it reviewed 🙂

@jessehouwing
Copy link
Contributor Author

I also don't think it would cause confusion, but it's inaccurate. Ideally the docs would explain clearly what the effect is, cause even the update isn't entirely accurate.

The reason is that the logic isn't all that intuitive, as it's based on the remote's url.

  • Step 4: To configure Git to cache credentials for each GitHub repository by its clone url, enter the following command.
  • Step 6: Git will cache the personal access token for the repository using the clone url as key.

Cloning the same repo twice on the same machine won't cause the credential to be prompted, it has that available in the credential cache. If you replace the contents of a repo with that of another, the credentials won't work. If you change the remote url of the repo. the credentials will no longer work. But if you change the credentials of ANOTHER repo on disk to the remote of a cached repo, the credentials WILL be reused. Cause, the repo on disk has nothing to do with how the credentials are retrieved.

@jessehouwing
Copy link
Contributor Author

@isaacmbrown PR submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
account-and-profile Content relating to account and profile content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants
@jessehouwing @cmwilson21 @isaacmbrown @ANKIT-desigh @dawncharles85 @Saeidnasiri and others