[git] remote: repository not found fatal: not found

Why won't my git push? I created the repository and I keep getting this message:

C:\Users\petey_000\rails_projects\first_app>git push -u github master
Username for 'https://github.com': ***@gmail.com
Password for 'https://***@[email protected]':
remote: Repository not found.
fatal: repository 'https://github.com/pete/first_app.git/' not found

This question is related to git github

The answer is


I faced exactly the same error message. When I run ls -a, I found out that .git was missing (surely I deleted it by inadvertence in previous days). As what I have locally is the same as on the Github repository, I simply removed my local "folder" and cloned the remote one again. After that, everything worked fine for me:

rm -rf my_project
git clone https://github.com/begueradj/my_project.git

I have solved the same issue by giving the read permision from github account.

  1. Go to github account go the user write permission.
  2. When we clone the code we need read permission.
  3. When we need to push the code we use write permission so you need to give write permission.

Also, be sure, that two-factor authentication is off, otherwise use personal access tokens

Details here : Can I use GitHub's 2-Factor Authentication with TortoiseGit?


Please find below the working solution for Windows: It worked for me. 1 Open Control Panel from the Start menu. 2 Select User Accounts. 3 Select the "Credential Manager". 4 Click on "Manage Windows Credentials". 5 Delete any credentials related to Git or GitHub. 6 Once you deleted all then try to clone again.


Three things:

  1. Your GitHub username is not an email address. It should be a username (like "sethvargo")
  2. You have a trailing slash on your repo name:

    $ git remote rm origin
    $ git remote add origin https://github.com/pete/first_app.git
    
  3. You need to create the first_app repo. I looked at "pete" on GitHub, and I do not see the repository. You must first create the remote repository before you may push.


I tried pretty much everything suggested in the answers above. Unfortunately, nothing worked. Then I signout out of my Github account on VS Code and signed in again. Added the remote origin with the following command.

git remote add origin https://github.com/pete/first_app.git

And it was working.


In my case, it was different! But I think sharing my experience might help someone!

In MAC, the 'keychain access' has saved my previous 'Github' password. I was trying with a new GitHub repository, and it never worked. When I removed the old GitHub password from 'keychain access' from my MAC machine it worked! I hope it helps someone.


Make sure your git username and password is correct. In my case, it gave error when the username and password(especially the GIT TOKEN) was not correct.


This answer is a bit late but I hope it helps someone out there all the same.

In my case, it was because the repository had been moved. I recloned the project and everything became alright afterwards. A better alternative would have been to re-initialize git.

I hope this helps.. Merry coding!


If this problem comes on a Windows machine, do the following.

  • Go to Credential Manager
  • Go to Windows Credentials
  • Delete the entries under Generic Credentials
  • Try connecting again. This time, it should prompt you for the correct username and password.

control panel

enter image description here