Strip comment when validating SSH keys (BB-7903)

Issue #6729 closed
Jamison Valenta created an issue

Heyo -

I'm attempting to set up my SSH key, but the AJAX request from the modal window that saves the keys is getting a 400 error.

URI throwing error:!api/1.0/users/jamisonvalenta/ssh-keys

I can hit the URI by typing it into my browser(returns an empty JSON array), but the AJAX request is definitely failing (see attached screenshot)

Comments (11)

  1. Jamison Valenta reporter

    I'm running OSX 10.8 and the issue occurs in FF & Chrome (haven't tried with any other browsers)

  2. Jamison Valenta reporter

    That worked!

    Since the code wasn't working, I checked out the tutorial at and looked at the graphic in Step 6 which includes the comment, so I modified my key to look like the one in the graphic (my keys were generated by Puttygen in Win; both the standard WIN save and the openSSH generated public keys weren't validated by bitbucket). It makes sense to me to either 1. allow for trailing comments 2. update the graphic to not have the key comment at the end

    Thanks for your assistance!

  3. Atlassian Bitbucket

    This issue has been closed due to inactivity. If you continue to see problems, please reopen or create a new issue.

  4. Log in to comment