Git Push ERROR: Repository not found
I am having a very strange problem with git
and github
. When I try and push, I am getting:
git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
I added the remote:
git remote add origin [email protected]:account-name/repo-name.git
Any ideas?
Check to see if you have read-write access.
The Git error message is misleading. I had a similar issue. I had been added to an existing project. I cloned it and committed a local change. I went to push and got the ERROR: Repository not found.
error message.
The person who added me to the project gave me read-only access to the repository. A change by them and I was able to push.
I had the same problem, with a private repo.
do the following:
remove the remote origin
git remote rm origin
re-add the origin but with your username and pwd with writing privileges on this pvt repo
git remote add origin https://USERNAME:[email protected]/username/reponame.git
I ran into the same issue and I solved it by including my username and password in the repo url:
git clone https://myusername:[email protected]/path_to/myRepo.git
If you use Git on Windows, try to clear your credentials:
- Locate "credential manager" (should be in your Control Panel)
- Remove all credentials related to GitHub
I was getting the same error
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
and I had created the repository on Github and cloned it locally.
I was able to solve by opening .git/config and removing the [remote "origin"]
section.
[remote "origin"]
url = [email protected]:alexagui/my_project.git
fetch = +refs/heads/*:refs/remotes/origin/*
then I ran the following (again)
git remote add origin [email protected]:alexagui/my_project.git
git push -u origin master
and this time I was able to push to the repository.