SSH pubkey works on Server, fails on Cloud

Marakai November 1, 2017

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 id_rsa.pub.

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>@bitbucket.org"

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

Help!

Mike

1 answer

0 votes
Eric Henry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 3, 2017

Hey @Marakai,

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
TAGS
AUG Leaders

Atlassian Community Events