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

Connect to Github twice on personal AND enterprise profil

BartmanDilaw June 2, 2023

Hi everybody

I have 2 Github accounts I want to connect to Sourcetree.

    - One is my personnal free Github account

    - One is an enterprise Github account

I so have added this two accounts in Sourcetree connecting with token (enterprise) and password (personnal) - this works fine.

But when I want to clone a repository, I need to "set as default" the user that owns the repo even if the full https repo address has been set (the one with username).

Is there another way to do that because I don't want to switch everytime I change the Github server target ?

Hope I'm clear

Thanks

BDW

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2023

Sourcetree needs to know which account you want to connect with, so no, there's no way to avoid telling it.

BartmanDilaw June 2, 2023

But I thought the repo was storing the credentials that Sourcetree would use.

What about the "Repo Settings" to set Remote repository paths :

While editing the origin remote (e.g.) we can set url/path of the repo and the remote account to use
Why is it not working if the current account is not the default account ?

Thanks

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2023

It does, but you still need to tell it which one you want to use.

BartmanDilaw June 2, 2023

See my previous message edit.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2023

I'm afraid it's the same answer

Richard Shea
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 28, 2023

@Nic Brough -Adaptavist- When I use "ssh -T git@github.com" to know which account I connect with Github, it always point to the other one that I don't want to connect with. I want to commit the code to the right account. It always shows "ERROR: Permission to {Account1}/Repo.git denied to {Account2}. How can I connect to the Account1?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events