Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git push fatal: repository not found

I'm not sure what is going on. But every time I try to push or pull now with git I get this message "fatal: repository 'https://....' not found". I usually use source tree with bitbucket but am receiving the same error when I try from the command line.

The reason I'm so confused is I haven't done anything that should change the repository. This repository has had hundreds of commits from me and other team members and nothing has changed since we created it. We rarely use any advance features not even branching, just pull, push, commit, and merge. Any what could have happened and how to fix it?

I've already tried removing and re-adding the origin but no luck.

like image 205
MrRoboto Avatar asked Mar 10 '15 23:03

MrRoboto


2 Answers

As mentioned above this happens when the repository, team name or username changes. The solution is to set the new remote url, as shown below.

git remote set-url origin https://______________.git

like image 179
Mario Shtika Avatar answered Sep 17 '22 08:09

Mario Shtika


I think, my answer can save someone a few minutes and some nerves.

I ran into the same issue. Solved the problem by running the following Git command:

git push --set-upstream origin master

The reason: When you initialize git repository to local working directory, Git only initializes "origin", and has no upstream set to commit your changes.

like image 36
Davronbek Rahmonov Avatar answered Sep 19 '22 08:09

Davronbek Rahmonov