Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Sync a private github repository with a non-default account

Hi Community,

I'm new here and I would like to ask you a question:


I have two account on github, named A and B, both have private repositories. I have set the accounts and relative credentials on Sourcetree. Well while I try to sync (fetch, pull or push) private repo of the account A while A is the default account, no problem. While I try to sync private repo of the account B while B is the default account, no problem. But as soon as I try to sync a private repo of the account A while B is the default... it trow an error "repository xyz not found". So I have to go to tools/options/authentication and set A as default, come back to the main windows and now everything is working... for account A...


On the help page it is written that

"t is also possible to set an account as the default for a hosting service like Bitbucket. This means SorceTree uses these credentials (the username and Basic Auth password or OAuth token) when no username is specified in a Mercurial or Git URL."


And in the "remote details" pane (from the setting icon on the up-right main windows) I think I have correctly set all the information (including "username"):

remote: my_remote


Host type: github

Host root URL: (I cannot change this vale...)

Username: A



What have I miss? Can you help me to fix it?


Thank you very much,




System info:

 - Window 10

 - Sourcetree

1 answer

0 votes
Mike Corsaro Atlassian Team Jan 19, 2018

Hello! Could you please try the following:

  • Open the repository settings
  • Select the repo path and click the "edit" button
  • Change the URL / Path to: `` where USERNAME is your username
  • Repeat this step for the other repo with the corresponding account

Following GitHub convention path: USERNAME is equal to A (isn't it?).

I did it, nothing change: if A/B is the default account everithing work for A/B but not for B/A.


Here the error returned:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch --prune origin
remote: Repository not found.
fatal: repository '' not found

Completed with errors, see above.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

5,810 views 4 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you