anon
anon

Reputation:

12:44:45 PM Push failed: fatal: repository not found but it exists

I am using Github to sync my Android Studio Project.

I have been able to commit and push successfully for over a month.

After adding some files, I received this error.

12:44:45 PM Push failed: fatal: repository 'https://[email protected]/rrtigga.GetDisciplined1_0.git/' not found

However, the repo exists...

Here is a snippet from my terminal:

Rohits-MacBook-Air:GetDisciplined1_0 Spicycurryman$ git remote add origin [email protected]:rrtigga/GetDisciplined1_0.git
fatal: remote origin already exists.
Rohits-MacBook-Air:GetDisciplined1_0 Spicycurryman$ 

This is kind of an awkward error... I did some research and was unable to produce a solution.

GitHub: ERROR: Repository not found. fatal: The remote end hung up unexpectedly (different from similar posts apparently)

EDIT: It really exists:

https://github.com/rrtigga/GetDisciplined1_0

What is the problem here and how can I fix it?

Upvotes: 1

Views: 2798

Answers (1)

David
David

Reputation: 3113

You have a remote called origin which is configured to point to https://github.com/rrtigga.GetDisciplined1_0.git/, which is not the correct URL for your repository. You should be using either https://github.com/rrtigga/GetDisciplined1_0.git for access over HTTPS, or [email protected]:rrtigga/GetDisciplined1_0.git for SSH.

The error "remote origin already exists" means what it says: you're trying to add a remote with the same name as one that already exists. You need to either delete it first with git remote rm origin, or use git remote set-url to change the URL of the existing remote.

Upvotes: 5

Related Questions