Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

How to add more than one Github account to sourcetree Edited

Lateley I have a lot of problems with having more than one github account in sourcetree. I am using two github accounts (one private one for work) and one Bitbucket account. 

I am using ssh to connect to the accounts. Where Bitbucket is working fine, and depending on which github account I add first, One github account seems to work OK, it will not show the repositories. The other account shows all repositories but is not able to download any because it somehow looks at the account I added first. 

I have tried several things, for fixing this. 
I first started out with a fresh install of sourcetree (mac) and a new set of SSH keys. 
Then adding the accounts but this did not help.

Then I set up a personal access token to one of the github accounts and started to use the basic auth type and not OAuth this did not help either.

I also saw that sourcetree does not allow you to select your own SSH key, and keeps on using the wrong one. I moved the one it found so it could not find it anymore. 
Hoping it would find the correct file, but now it cannot find the other file which is added to GitHub. So I generated a new one in Sourcetree and added it to GitHub. 

This did not work either, cloning a repository from this account still gets confused with the wrong login. 

Errors found are:

ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
ERROR: Repository not found.
fatal: Could not read from remote repository.

 

Please make sure you have the correct access rights
and the repository exists.
origin git@github.com:*/*.git (fetch)   // note this is the wrong account 



I am out of idea's and starting to believe I should not be using sourcetree anymore.
It is at least too much time consuming to be bothered by it every time. 

I hope somebody has a good solution for this, as the interface is easy and helpful

 

 

UPDATE: 
It also seems like it, that Sourcetree is having some sort of cache.
After I added a new ssh file to Github, removing the old one from the config file in the .ssh directory and removing the ssh file from the .ssh directory it still seems to want to add that specific ssh file. 

I removed Sourcetree all together, also removing files that where associated with it. 
After reinstalling, it still seemed to have my account data in there. 
So far for a 'clean' install. 
Thus I followed these steps: https://community.atlassian.com/t5/Sourcetree-questions/How-do-I-fully-remove-SourceTree-so-that-I-can-do-a-quot-fresh/qaq-p/605355

After reinstalling still the same 'wrong' ssh keys where found and used by sourcetree.
The worst part is, that I cannot set my own SSH file. I cannot choose it. Sourcertree just tells me that I need that file (somewhat frustrating). 

So I am trying again, but now with rebooting my computer after removing all files. 

 

3 answers

1 accepted

0 votes
Answer accepted

After removing and re-installing several times the problems are still there. 
As it seems nobody has answer it looks like I need to start working with another application. 

It also seems like it, that Sourcetree is having some sort of cache.
After I added a new ssh file to Github, removing the old one from the config file in the .ssh directory and removing the ssh file from the .ssh directory it still seems to want to add that specific ssh file. 

I removed Sourcetree all together, also removing files that where associated with it. 
After reinstalling, it still seemed to have my account data in there. 
So far for a 'clean' install. 
Thus I followed these steps: https://community.atlassian.com/t5/Sourcetree-questions/How-do-I-fully-remove-SourceTree-so-that-I-can-do-a-quot-fresh/qaq-p/605355

After reinstalling still the same 'wrong' ssh keys where found and used by sourcetree.
The worst part is, that I cannot set my own SSH file. I cannot choose it. Sourcertree just tells me that I need that file (somewhat frustrating). 

So I am trying again, but now with rebooting my computer after removing all files. 

 

Hi,

When you're cloning the projects from two GitHub accounts, you also need to map those accounts in the Sourcetree before cloning the repository. Once you clone the repo from account 1, switch to the another account and then clone from account 2. 

Suggest an answer

Log in or Sign up to answer
TAGS
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...

3,785 views 4 7
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