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.
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.
Hope this helps. I might've misunderstood your question, let me know if this is the case.
Cheers,
Daniil
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Cheers,
Daniil
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.