Search code examples
gitgithubatlassian-sourcetree

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?


Solution

  • 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