Tech
Using Multiple GitHub Accounts: Automatically Select the Correct `gh` PAT Based on Repo Owner
When using multiple GitHub accounts, the process of selecting the correct Personal Access Token (PAT) for git push or git pull over HTTPS can be a bit cumbersome.
Specifically, when dealing with repositories from multiple owners, such as:
https://github.com/aont/foo.git
https://github.com/another-user/bar.git
Git Credential Manager or gh auth git-credential might default to the currently active account, leading to errors like:
remote: Permission to owner/repo.g...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to