You can use the SSH REST API.
Example:
curl -X POST -u username:password -H "Content-Type: application/json" -d '{ "key": { "text": "ssh-rsa AAAAB3... me@127.0.0.1" }, "permission": "REPO_READ" }' "http://<baseurl>/rest/keys/1.0/projects/{projectKey}/repos/{repositorySlug}/ssh"
Hope that helps,
Felix
So If I'm using Bitbucket Cloud is this possible, can't seem to find any documentation about it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For Cloud REST API it looks as if they are called 'Deploy Keys' instead of 'Access Keys'. You can manage them with the v1 API: https://confluence.atlassian.com/bitbucket/deploy-keys-resource-296095243.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.