Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble setting up sourcetree with companies Gitlab

John Morrison
June 29, 2026

Our IT security is high, we have Gitlab on one of our servers but I can not get Sourcetree to connect to it.  Login isn't working correctly.  Need help!

John

 

2 answers

1 vote
Martin Runge
Community Champion
June 29, 2026

Hi @John Morrison

Welcome to the Atlassian community!

With a self-hosted GitLab in a high-security environment, I would skip the "Add an account" OAuth flow in Sourcetree. Sourcetree's OAuth is meant for GitLab.com and often fails with self-hosted instances, especially with SSO or reverse proxies.

The most dependable method is to use SSH or a Personal Access Token. In GitLab, you can create a PAT under User Settings > Access Tokens, ensuring it has read_repository and write_repository scopes. Then, clone the repository using the HTTPS URL in this format:

https://<your-pat>@gitlab.yourcompany.com/group/repo.git

If your company has an internal certificate authority, Sourcetree may silently reject the SSL certificate. Verify by running git clone in a terminal. If it fails with an SSL error, add your company's root CA certificate to the system trust store.

John Morrison
June 29, 2026

Thank you for the fast response! I will try PAT first.  Awesome community, glad I reached out.  

Like # people like this
1 vote
Tomislav Tobijas
Community Champion
June 29, 2026

Hi @John Morrison ,

Have you already tried any specific steps? Sourcetree to self-hosted GitLab can sometimes be a bit tricky due to specific configuration steps (in high-security environments).

Usually, users connect GitLab with Sourcetree by using Personal access tokens (PATs; HTTPS). Once you generate a token, navigate to Sourcetree Tools > Options > Authentication (Windows) or Sourcetree > Settings > Accounts (macOS) and add your GitLab acc using PAT as the password. 

An alternative way would be to use SSH keys. This is the article for Bitbucket, but pretty much the same thing would apply for GitLab: Set up SSH with Sourcetree 📖

Note that, depending on how your environment is set up, you might need to check self-signed certificates or SSL, as these can block connections 👀

Again, if you have anything specific that you already tried, it would be useful if you could share it here.

Cheers,
Tobi

John Morrison
June 29, 2026

Thank you Tobi, I will try using a PAT.  Wonderful community!  Fast replies!  I greatly appreciate your help.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events