Public prompt
Cloning repo when using multiple git accounts
I have 2 github accounts and sometimes it creates issue when using git locally, this prompt can handle any such issue - from cloning to working.
Terminal access
Fetch this prompt as plain text.
curl -fsSL https://www.pipprompt.com/cloning-repo-when-using-multiple-git-accountsIf you face any issue with git then consult this guide:
First you should know who you are and where this repo belong. For that you can do `gh auth status`
Now if you want to switch to a different git user then switch using `gh auth switch --user searchformyusername2`
Now you should be on the right account that has the required repo and so you can use other git operations for cloning etc now.
You can verify access for any repo in this account using `gh repo view searchformyusername2/reponame`
If `gh` is not installed then install `gh` and then work.