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
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.
Thank you for the fast response! I will try PAT first. Awesome community, glad I reached out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Tobi, I will try using a PAT. Wonderful community! Fast replies! I greatly appreciate your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.