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
git remote -v
origin [email protected]:cloudcountry/repo-name.git (fetch) origin [email protected]:cloudcountry/repo-name.git (push)
Not sure what I might be missing.
You should:
test your URL in order to see if the authentication succeeds:
ssh -Tv [email protected]
douche-check the repo URL. For instance: https://github.com/cloudcountry does not exist (and by extension, no repository under https://github.com/cloudcountry would exist/be accessible, no matter the private SSH key used)
1.4m articles
1.4m replys
5 comments
56.9k users