Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SourceTree - git: fatal: remote error: Repository not found

I just signed up for a github account at work and created a new repository. I ran a few git commands over command line and everything worked fine.

1. git init  2. git add . 3. git commit -m "first commit" 4. git remote add origin https://github.com/username/project.git 

Then, when I added the working copy from sourcetree and clicked the Fetch button, i get "error: Repository Not Found". I try push and pull and i get the same error. I've been using sourcetree with my bitbucket and github repositories for a few months now but i've never had this problem. Has anyone had similar issues?

like image 217
Alaa Awad Avatar asked Feb 04 '14 21:02

Alaa Awad


People also ask

How do I fix remote repository not found?

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.

Why is my git repository not found?

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.

How do I resolve a fatal error in git?

A Git command needs to be run on a specific repository, so this error typically occurs when a Git command is run in a directory that Git doesn't know about. In these cases, the fix is to make sure that you are both working in the correct folder and that you set up your repository right.


2 Answers

Had the same issue. The reason in my case was that I authenticated via https on command line but then used sourceTree via oAuth. Setting the Auth type to "Basic" in my Account settings helped.

like image 117
stoefln Avatar answered Oct 03 '22 08:10

stoefln


I figured it out the issue. I already had a a personal github account linked to sourcetree. When i deleted the personal github account and added the work account it worked fine.

  1. Go to Tools -> Options
  2. Click on Authentication Tab
  3. Delete the other github account and add the new one
like image 41
Alaa Awad Avatar answered Oct 03 '22 08:10

Alaa Awad