Long-time Git/GitHub user, first-time poster.
Never had issues using Git/GitHub until today. I have created a new GitHub account today that I need to start using. I still need to use my regular account though.
From the computer side, I can’t seem to get this working. I have researched the issue before posting here and I have done a bunch of things which as I understand it should make it work. Alas, it is not.
- I have created a new SSH key pair, uploaded the new public key to the new account on GitHub.
- I have made sure the new SSH key is being added to my SSH agent.
- I have created separate host entries in my SSH config file for the two separate accounts and specified the correct SSH key for each host entry.
- In the local Git repo I want to use with this new GitHub account, I have set the username and email using
git configommiting the
--global, which I think should override the global settings.
When I try to push the new repo to the remote on the new GitHub account, it’s not working.
ERROR: Repository not found. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
I have definitely added the remote, which I copy/pasted from the remote repo page. I have actually done this twice. Both times the command completes without error. However if I run
git remote show origin, I get the same response as above.
Any ideas what I am doing wrong or how I can fix this?