SSH pubkey works on Server, fails on Cloud

I've been migrating my repos from my hosted Bitbucket Server to Bitbucket Cloud and for the most part it's been problem-free.

Except for one baffling issue:

I can no longer use Git ssh to pull/push my Windows based repos. I get the notorious message about invalid pubkeys, but with a twist.

First, needless to say, I copy-pasted the public SSH key into my Bitbucket Cloud Project. The SSH keys are called id_rsa and

Some things I've tried:

  • Push a branch from Windows machine to Bitbucket Server repo: WORKS (and has for years now)
  • Push a branch from Windows machine to same repo now in Bitbucket Cloud: FAILS (pubkey is in place)
  • Install the SSH keys on a Linux machine and clone and push the same repo to Bitbucket: WORKS (a new Linux account, so I wouldn't have any "lingering" SSH keys)
  • Any repo I had moved from Server to Cloud but Linux-based: WORKS
  • Mac OS build machine pulling the Windows repo via a Bamboo agent: WORKS (it's a Xamarin project developed on Windows for iOS/Android)
  • As the SSH keys on Windows are on a file share/UNC drive, copied them to a local directory on Windows machine and pointed .ssh/config at them: FAILS (i.e. makes no difference where on Windows the key files are)
  • Cygwin command line on Windows: FAILS
  • Gitkraken GUI on Windows (with the SSH keys used): FAILS
  • Gitkraken GUI on Windows (with newly created internal keys copied over to Bitbucket Server): FAILS
  • MINGW window from Gitkraken on Windows: FAILS

In other words:

  • Bitbucket Server Git ssh works and worked from Windows, Linux, MacOS
  • Bitbucket Cloud Git ssh works only on Linux and MacOS and fails on Windows.

Just as icing on the cake, I did a

"ssh -Tv <myprojectaccount>"

and that works! I get a "can't SSH into this account" as expected, but I see the key exchange working just fine.

I'm pulling my hair out here!

None of the online solutions apply:

  • I *do* have the public key installed
  • The keys *are* working, but only in a certain combination as outlined above



1 answer

0 votes
Eric Henry Atlassian Team Nov 03, 2017

Hey @Michael Hoffmann,

Could you create a support ticket for this?

What you're describing sounds very strange, and a support ticket will help us make sure you get this resolved.

Eric Henry
Development Team Lead, Bitbucket Cloud

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,915 views 7 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you