How do I use SSH with Sourcetree?

You can use SSH URL with Sourcetree. Sourcetree relies on the same SSH accounts you create when you are working from the command line. If you haven't already created an SSH key for your Bitbucket account, see Use the SSH protocol with Bitbucket.

  1. Make sure you have already used ssh-keygen to create an identity on your system.
  2. Start Sourcetree.
  3. Choose Add repository.
  4. Supply the SSH source path from Bitbucket.
  5. Enter a Destination Path.
    At this point the dialog looks something like this:
  6. Press Clone.
    If the key is not in your key chain, the system will prompt you for it.

You are ready to start using your repository.

Was this helpful?

Thanks for your feedback!

6 Archived comments

  1. User avatar

    Anonymous

    I can't recognize the usefulness of this FAQ article, besides the only note to go visiting the Sourcetree documentation.

    01 Aug 2013
    1. User avatar

      manthony

      Well, you don't have to use the article. In the last month, this article actually received 767 hits and people who landed here spent an average of 4 minutes on the page. Users get here through Google search which doesn't work with Sourcetree documentation which is in the application.

      01 Aug 2013
  2. User avatar

    Anonymous

    Is there a way to set it to work with a standalone ssh fronted git server, that uses two factor auth rather than key auth?

    06 Aug 2013
    1. User avatar

      manthony

      That I do not know.  You can ask this on answers.atlassian.com as that is pretty active with Sourcetree.

      06 Aug 2013
  3. User avatar

    Anonymous

    I think the reason people spent so long on the page is that its very confusing. I stuck on the page for a while re-reading it.    Is there a simple page that shows the process of setting up a ssh key using source tree and importing it into bitbucket... I can't seem to find it... or get it working on windows.  

    04 Jan 2014
  4. User avatar

    Anonymous

    I think for those using custom name for ssh-keygen, you need to add ssh-add command. You can check Set up SSH for Git and Mercurial on Mac OSX/Linux -> Step 4. Start the ssh-agent and load your keys. I manage to use SourceTree to add my custom SSH Key. Good Luck!

    12 Feb 2014
Powered by Confluence and Scroll Viewport