Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements


  • Give kudos
  • My kudos


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

FORCE Bitbucket/Sourcetree to use HTTPS instead of SSH? Edited

I can no longer use the "Check out in Sourcetree" buttons on Bitbucket Cloud to check out branches of my repository via Sourcetree. Attempting to do so causes Sourcetree to say that I don't have any SSH keys set up in Pageant and would I like to do so.

I recently set up an SSH key on my Bitbucket account to get credentials for a build pipeline. I don't want to use SSH as my primary login method because I would need to transport that private key to all the computers I develop on, which I'd rather not do, but I do need SSH enabled for some specific use cases where I need a passwordless login.

I cannot find any way to force Bitbucket to default to HTTPS. The best I seem to be able to do is to get an HTTPS URL for cloning a repository, but this doesn't work if I've created a new branch (ex. via Jira) and wish to check out that branch via Sourcetree. I've looked through all the Sourcetree and Bitbucket Cloud settings that made sense and have read several similar questions here on Atlassian Support (originally I was getting "This is not a valid source path" errors before upgrading Sourcetree to v3.2.6), all to no avail.

I'm running Sourcetree for Windows v3.2.6, and our repos are stored in Bitbucket Cloud. `git remote -v` on the affected repository shows https URLs for fetch and push, and Sourcetree is still set up with https URLs. Aside from upgrading to 3.2.6 from 3.1.x, I have not made any changes to my local repository/working copy or Sourcetree configuration.

1 answer

0 votes

Hello @Wesley Fok,

Thanks for reaching out.

Once you have an SSH key set up for your Bitbucket account, the first suggested clone URL for any repository will be indeed the SSH one. Unfortunately there's no special preference for that.

However, Clone in Sourcetree action respects the clone URL currently selected in the dialog, so if you switch it to HTTPS before clicking the button, Sourcetree should use HTTPS remote URL.

ssh.png    https.png

Hope this helps. I might've misunderstood your question, let me know if this is the case.


Thanks Daniil for the reply.

Unfortunately, this only works for cloning a new repository. The problem I'm having is when I create a new branch of an existing repository and try to check out the branch in Sourcetree. There is no option to switch between SSH and HTTPS and thus no way to force Bitbucket to open Sourcetree using an HTTPS URL for the new branch.

Like Daniil Penkin likes this

Oh, now I get what you mean. Indeed, the Check out in Sourcetree button for a branch gives no choice and uses SSH if you have any key configured in your account.

Do you mind creating an issue in our public issue tracker? This way we'll be able to notify you when we do something about this view.

For now, the workaround I can think of is to clone the repo from Source view (there's View source button on the branch view), and then switch to the branch in question within Sourcetree.

Sorry for the inconvenience.


No problem! Here's a link to the issue:


Like Daniil Penkin likes this

Suggest an answer

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

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,912 views 0 7
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