Reputation: 25022
I have created a project in a shared repository. I also have created a separate repository that I want to push this code up to. I added a remote
repository in the repo with:
git remote add <repo-name> https://github.com/<org>/<repo-name>.git
The url that was used in the above command was the url from the clone
button on the repo homepage.
When I ran the command git push <repo-name> master
, the error message it get is:
remote: Repository not found.
fatal: repository 'https://github.com/<org>/<repo-name>.git/' not found
What am I missing to be able to push this code to this repo?
Upvotes: 0
Views: 48
Reputation: 46
There are many reasons for this kind of error.
Check your spelling
Typos happen, and repository names are case-sensitive. If you try to clone [email protected]:user/repo.git
, but the repository is really named User/Repo you will receive this error.
To avoid this error, when cloning, always copy and paste the clone URL from the repository's page. For more information, see "Cloning a repository."
To update the remote on an existing repository, see "Changing a remote's URL".
Checking your permissions
If you are trying to clone a private repository but do not have permission to view the repository, you will receive this error.
Make sure that you have access to the repository in one of these ways:
Check your SSH access
In rare circumstances, you may not have the proper SSH access to a repository.
You should ensure that the SSH key you are using is attached to your GitHub user account. You can check this by typing the following into the command line:
ssh -T [email protected]
Hi username! You've successfully authenticated, but GitHub does not
provide shell access.
Check that the repository really exists
If all else fails, make sure that the repository really exists on GitHub! If you're trying to push to a repository that doesn't exist, you'll get this error.
Upvotes: 3