I set up multiple GitHub accounts on my ubuntu machine following the instructions in this article: https://www.freecodecamp.org/news/manage-multiple-github-accounts-the-ssh-way-2dadc30ccaca/.
I am able to pull from the repository, but I cannot push. I keep getting the access denied error:
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Here is what my ssh config looks like:
Host github.com
HostName github.com
IdentityFile ~/.ssh/github
IdentitiesOnly yes
Port 22
Host cloudcountry.github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa_cloudcountry
User git
IdentitiesOnly yes
Port 22
Host gitlab.com
HostName bitbucket.org/
IdentityFile ~/.ssh/cloudsun_id_rsa
IdentitiesOnly yes
Port 22
These are the git remotes
git remote -v
origin git@cloudcountry.github.com:cloudcountry/repo-name.git (fetch)
origin git@cloudcountry.github.com:cloudcountry/repo-name.git (push)
Not sure what I might be missing.
question from:
https://stackoverflow.com/questions/65559538/multiple-github-accounts-on-linux-cannot-push-to-remote-but-can-pull 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…