Fix 5 - Git - remote: Repository not found Just run the git remote update command which updates the local repo with the remote repo and its credentials. If this command is executed without any issues then your issue will be resolved.
Error: Repository not found. If you see this error when cloning a repository, it means that the repository does not exist or you do not have permission to access it.
To view your remote branches, simply pass the -r flag to the git branch command. You can inspect remote branches with the usual git checkout and git log commands. If you approve the changes a remote branch contains, you can merge it into a local branch with a normal git merge .
To add a new remote, use the git remote add command on the terminal, in the directory your repository is stored at. The git remote add command takes two arguments: A unique remote name, for example, “my_awesome_new_remote_repo” A remote URL, which you can find on the Source sub-tab of your Git repo.
Remove the all github.com credential details from the system.
For mac
Delete the github.com password from the Keychain Access.
For window
Delete the credentials from Credential Manager.
Please find below the working solution for Windows:
I was also facing the same issue
remote: Repository not found
fatal: repository 'https://github.com/MyRepo/project.git/' not found
I uninstalled the git credentials manager and reinstalled it and then I could easily pull and push to the repository. Here are the commands
$ git credential-manager uninstall
$ git credential-manager install
This message can occur when a repository IS found, but we don't have commit access. Not well-worded!
I received the repo-not-found message after cloning a gitHub repository created for me by my boss. I could clone and commit locally, but could not push commits upstream. The repository owner had not given me write access. Solved by a plea for write access to the repo owner.
Because you probably did not identify the remote git repository to your terminal first.
git remote set-url origin https://github.com/MyRepo/project.git
and then,
git add .
git commit -m "initial commit"
git push origin master
This issue here is you local git is not able to push the changes to the remote Check your remote is set correctly by
git remote -v
if it is not set properly try setting your remote as
git remote set-url origin https://[email protected]/MyRepo/project.git
Then try pushing using
git push -u origin master
Also there is a possibility of your local git has different credentials, please check that also.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With