Sourcetree Bitbucket Ssh

From Sourcetree, open the PuTTY Key Generator dialog by going to Tools Create or Import SSH Keys. Click Load, navigate to your SSH folder, and click the private key. Enter your passphrase for the SSH key and click OK. Copy the public key in the first field. From Bitbucket, choose Personal settings from your avatar in the lower left. Because Bitbucket hosts only allow Git to make SSH connections, the first time you access Bitbucket using the SSH URL, your SSH client checks to see if the Bitbucket host is a known host. If the host is not in your /.ssh/knownhosts file, SSH warns you that it's adding the Bitbucket host to known hosts if you continue.

  1. Connect Sourcetree To Bitbucket Ssh
  2. Sourcetree Bitbucket Ssh Login
  3. Sourcetree Bitbucket Ssh Windows
  • Status:Gathering Interest(View Workflow)
  • Component/s:Integration - Sourcetree
  • Labels:
  • Feedback Policy:

    Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

KeySourcetree Bitbucket Ssh

Based on a question I posted at, I was encouraged to create an issue in the public tracker.

Steps to reproduce

  1. In Sourcetree, add an existing Bitbucket repo using the HTTPS clone URL
  2. In Bitbucket Cloud, attach an SSH key to your user account
  3. Create a new branch in a repository
  4. Click on the 'Check out in Sourcetree' button on the branch post-creation page

Connect Sourcetree To Bitbucket Ssh

Actual behavior

Bitbucket ssh git

Sourcetree opens and attempts to check out your branch using an SSH URL for that repo. Older versions (3.1.x on Windows) will simply throw a 'This is not a valid source path / URL' error in Sourcetree. The current version of Sourcetree for Windows will first ask you to add an SSH key to Pageant to connect to the repo via SSH. 5pm est to utc. If you reject this dialog, another will appear saying no SSH keys were configured, and then you get the 'This is not a valid source path / URL' error as before.

Requested behavior

Allow the user to choose on the branch post-creation page whether to use an SSH URL or an HTTPS URL for Sourcetree, similar to the selector on the Clone Repository dialog. Alternatively, maybe convert the SSH URL into an HTTPS URL on the fly if Sourcetree detects a URL that uses a different protocol from the one used to set up the repo in Sourcetree.


I needed to add an SSH key to my Bitbucket account to allow passwordless logins in one of my build pipelines. However, elsewhere I am quite happy with my current account login-based setup, and don't really want to set up SSH keys on all the machines I access Bitbucket from.

However, as soon as you set up an SSH key in Bitbucket Cloud, it automatically assumes you want to use SSH URLs for everything. This means any Sourcetree installs I have that still use account logins to access private repos will no longer work when I click the 'Check out in Sourcetree' button.

The current workarounds appear to be either

  • set up every machine that needs access via my account with its own SSH key;
  • copy the SSH key to all machines that need it;
  • stop using the 'Check out in Sourcetree' button and resort to standard git commands
2Vote for this issue
1Start watching this issue

The URLyou use for a repo depends on which protocol you are using, HTTPSor SSH. The Bitbucket repositoryOverviewpage has aquick way for you to see these URLS for your bb101reporepo. Onthe repo'sOverviewpage lookfor theClonebutton.

Experiment for a moment, clicking back and forth between theSSH and the HTTPS protocol linksto see how the URLs differ. The table below shows the format foreach DVCS based on protocol.

SSH URL format

HTTPS URL format

Mercurialssh://[email protected]/accountname/reponame/


[email protected]:accountname/reponame.git


ssh://[email protected]/accountname/reponame.git

In the SSH format, the accountname appears after[email protected] or [email protected] In HTTPS format, theaccountname before[email protected] [email protected]

Sourcetree bitbucket ssh download

Make the change

Got to a terminal on your local system and navigate to yourbb101repo-pratice repo. Then, do the following for Git andMercurial:

Git users do this:

Sourcetree Bitbucket Ssh Login

  • View your current repo configuration.
    You should see something similar to the following:

    As you can see, the url is using the HTTPS protocol. There are anumber of ways to change this value, the easiest way is just toedit the repo's configuration file.

  • Edit the ~/repos/bb101repo-pratice/.git/config file with yourfavorite editor.
  • Change the url value to use the SSH format for that repo.
    When you are done you should see something similar to thefollowing:

Mercurial users do this:

Sourcetree Bitbucket Ssh Windows

  • View your myquotefork repo configuration.
    You should see something similar to the following:
  • Edit the ~/repos/myquotefork/.hg/hgrc file with your favoriteeditor.
  • Change the default value to use the SSH format for thatrepo.
    When you are done you should see something similar to thefollowing:
  • Save and close the configuration file.