fatal: repository not found

Hello

I cant update my repository.  The message I get is:

fatal: repository ‘https://github.com/aceofwings/RotairERP.git/’ not found

when I enter git remote -v I get

origin  https://github.com/aceofwings/RotairERP.git (fetch)
origin  https://github.com/aceofwings/RotairERP.git (push)

I havent been using git that long.  I dont know what it means when one command cant find the repository another command reports.

I did log into git with a different accout then sqitch back.  I suspect that some part didnt switch over while another part did.  Just my best guess.  Before I spend hours trying to figure out this pecularity I thought best to see if someone with more knoweldge of git may know what this means.

I am using windows 10 and one repository is private and the other is public, if that matters.

Thanks

4 Likes

That repository is probably private. Try: 

git remote set-url origin https://YOUR_GITHUB_USER@github.com/aceofwings/RotairERP.git
59 Likes

Yes, it is private.

C:\Code86\RotairERP>git remote set-url origin https://Marvelous-Software@github.com/aceofwings/RotairERP.git

C:\Code86\RotairERP>git push origin master
remote: Repository not found.
fatal: repository ‘https://Marvelous-Software@github.com/aceofwings/RotairERP.git/’ not found

And yes I do have rights to the repository:

Is there any documentation for the error messages?  Ive seen the book, https://git-scm.com/book/en/v2

But that is only useful when everything is working.  I cant find any trouble shooting guides.  

Any assistance is appreciated.

1 Like

Has @aceofwings added you as a collaborator on that repository? Since it is private, if they haven’t done that, you won’t be able to access the repository. Beyond that, since it is a private repository you should probably contact private support at https://github.com/contact. They will have the access to take a look at what might be going wrong.

1 Like

Thanks for your reply.

OK, I’ll try that.  But with several days downtime, a couple of hours trying to fix the issue github appears to be too expensive as far as lost time goes to be worth using.  Unless your suggestion saves the day.

thanks

2 Likes

This can be closed.  Since we cant use Github we have decided to use an alternate.

1 Like

I have a similar issue to Marvelous-Software.  I created/initialized a local repo (“testrepo”) in Bash/Git, added a file and did an initial commit.  I tried running this command:

git remote add origin https://github.com/<my-github-username>testrepo.git

as well as one similar to what you suggested:

git remote set-url origin https://github.com /<my-github-username>testrepo.git

In both cases, the command git remote --verbose returned results that the above url (minus the .git at the end) existed for fetch and pull.

However, when I go to my github account, the aforementioned repo doesn’t exist.

Any suggestions?

1 Like

@skipstevenson when you create a repo locally, GitHub has no way of knowing you did that. So you have to tell GitHub to create a repo on GitHub for you. You can do this in a few different ways, the simplest one is to go to https://github.com/new and follow the instructions. Once you’ve done that, then the remote connection you’ve defined already will work.

I hope that helps!

6 Likes

go to this url. It worked for me.

2 Likes

Thank you, this worked! Trying to set up GitHub for the first time, and I kept getting the fatal : repository not found error, despite the repository being public in GitHub. 

Used the command you provided, followed by push, and success.

The same problem is in my private repo.

This trick saved me big time.

It turned out that I had old session state:

  1. Open Control Panel from the Start menu
  2. Select User Accounts
  3. Select “Manage your credentials” in the left hand menu
  4. Delete any credentials related to Git or GitHub

Once I did this, it started working again.

8 Likes

I put together a list of five different reasons why this error might happen over on TSS. You might find this helpful.

https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Five-ways-to-fix-Gits-fatal-repository-not-found-error

2 Likes

This worked for me, repo is private. Thanks

This worked for me, thank you! I have been using Source Control on VS Code for ages and it suddenly stopped working but this fixed it… cheers

1 Like

I just tried 

git remote set-url origin https://YOUR_GITHUB_USER@github.com/aceofwings/RotairERP.git

and it didn’t work 

Works great!

Then create a Personal Access Token with repo & read/write permissions (or whatever your use case is) as the password.

Thanks @skipstevenson  for this solution. It work for me

Trying to push my the very first commit into my private repo:

C:\TMP\New folder>git remote add origin https://github.com/glestwid/tcc.git
fatal: remote origin already exists.

C:\TMP\New folder>git remote --verbose set-url origin https://github.com/glestwid/tcc.git

C:\TMP\New folder>git push origin master
remote: Repository not found.
fatal: repository ‘https://github.com/glestwid/tcc.git/’ not found

C:\TMP\New folder>

I do see the repo on my page at Github but at the same time git nither asks me regarding credentials nor gives me an access. What did i do wrong?

1 Like

Is the name of the repo tcc? Or tcc.git? If it is tcc.git then the remote you listed could be ambiguous.

1 Like