Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

how can I connect to remote repository in gitlab via sourcetree?

I've added a ssh key in my gitlab profile and tried to connect via sourcetree. as  new-> clone from URL. here I've entered the SSH URL of the repository in gitlab, and it says it's invalid repository URL. 

2f authentication enabled in gitlab. I'm using sourcetree version 2.7.1 in mac.

anybody has already similar issue? or anybody can help me?




1 answer

3 votes
Ana Retamal Atlassian Team Mar 30, 2018

Hi Jay! Sourcetree does not directly support GitLab as a hosting service. This request is tracked in SRCTREE-1037. While you can't browse remotes or utilize any other extended integrations you are able to clone the repo via URL and use the rest of Sourcetree without restriction. 


You're running into one of the known limitations of 2FA and SourceTree at the moment. Currently, SourceTree will use SSH to do most everything with Bitbucket except build a list of repositories. There is an open feature request here to allow application specific passwords, this would allow SourceTree to use that set of credentials and get the list of repositories. Until then, you'll need to manually add the repositories into SourceTree as it's not possible to authenticate with SourceTree to Bitbucket once 2FA is turned on.
You might want to try the solution provided at 2fa with Github in Sourcetree, but please keep in mind that those were designed for Github, not Gitlab, so they might not work in your case.


Hope that helps!


Like # people like this

Suggest an answer

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

Bug Fix: Sourcetree for Windows authentication error when updating to app password

Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...

60,418 views 127 26
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