github provide public ssh key by URL like http://github.com/user.keys
.
Is there a way also in bitbucket to obtain public keys via URL?
Using Bitbucket's REST API version 1, you can get the SSH keys of a user with this endpoint:
https://bitbucket.org/api/1.0/users/#{user}/ssh-keys
Here is a full reference from the API documents:
https://confluence.atlassian.com/display/BITBUCKET/ssh-keys+Resource
I'm not sure if they plan to include this in version 2 of their API, but it should work with other API calls.
You need an account to authenticate your requests. Here is how to use the REST APIs: https://confluence.atlassian.com/display/BITBUCKET/Use+the+Bitbucket+REST+APIs
EDIT:
Here's the relevant documentation for v2 of their REST API:
https://developer.atlassian.com/bitbucket/api/2/reference/meta/authentication
https://developer.atlassian.com/bitbucket/api/2/reference/resource/users/{username}/ssh-keys
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With