Ionic SSH Keys

#1

When trying to add a Bitbucket SSH public key to my “Personal Settings” in Ionic Pro, I get the error:
An error occurred while validating the request parameters.

Looking at the request sent in Chrome dev tools, the whole error is:

{"error": {"link": null, "message": "An error occurred while validating the request parameters.", "type": "UnprocessableEntity", "details": [{"parameter": "pubkey", "error_type": "invalid", "errors": ["String does not match expected authorized_keys public key format with non-whitespace annotation."]}]}, "meta": {"status": 422, "request_id": null, "version": "2.0.0-sdlc-beta.0"}}

Obviously, the issue is String does not match expected authorized_keys public key format with non-whitespace annotation. However, I don’t get what I’m doing wrong? I even tried re-adding keys I already had only to get the same error.

I get the same issue if I try it through the command line using ionic ssh add. Both on Ionic 3.20.0 and Ionic 4.1.0.

The format of public key I’m trying to add is as follows (not the actual key):

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQClYVD07L8QqcFTohdV4WC5z2fHAwtT0K9lCZWB+7yjvG2ywrPGfWIDeDAIYhutAmIDYogI1WnXDh3dfzlsUHQSPWkN+lnkSPSPWOu5Be8VbTr++NReEUj673EFt0eQvPZPXQjO0RFOrOB9tEhGCT4xlCNjm4dHU4HoWt/y8NUHVKPiz1qwYzR6TMkBOAUvJixAc6wZG7Vv/n9jHud5btU/y0cvZn27ofVJ6eWohxIISbIcju2ag9iFeYFQKfqHHRJV86jh9BxSPbfg22x38tYNawx2iKJ+6FeWywu7mBrqdHhiH09c0HWgLqLdQ4AmveU3XomIX9ek/3Yru7Ob40GXN6g5UEHgJ188rQECL938YJ4T6h7+vNh31lvTil1D/pKBl9BmiztRPbZmqXsQ7eWtXK+++9R8vUFORdxLmzNklqf3c39/f9UXmKTBf9N8LbmBAFp93XBDdWqlXRweUfJJ7WxlAKLTgthzpNOep2rT3XZAuwGTnsuKqwVST8Z7UUk=

Any ideas? Is it me doing something wrong or is something on Ionic broken?

1 Like
#2

I have the same issue, unable to add my ssh key to my account, I get HTTP 422 in the response with the same error message. Any solutions?

#3

Just solved it, the key wasn’t correct, I had two keys in my local computer, and one was matching Ionic’s repos, second was some other thing …
I guess creating a new matching Ionic’s standards - work here.