-
-
Save uolot/6566557 to your computer and use it in GitHub Desktop.
curl --user <USER>:<PASSWORD> -X POST https://bitbucket.org/api/1.0/users/<USER>/ssh-keys --data-urlencode "key=<PUBLIC_KEY>" --data-urlencode "label=<LABEL>" |
Unfortunately this is not working anymore. The API responds with:
This API has been deprecated and is not available through OAuth2 or JWT
@josa42, facing same issue. Could you tell how you managed to update ssh keys programatically?
any update on this?
curl -u "<USERNAME>:<PASSWORD>" https://bitbucket.org/api/1.0/users/<USERNAME>/ssh-keys --data-urlencode "key=$(cat /root/.ssh/root.pub)" -data-urlencode "label=my_key"
This will add global keys regardless to repository (if you want write access to your all repositories), bitbucket also provide another option READ permission repository basis (useless unless you want to pull, not push). Unfortunately, there is no option to make WRITE permission for certain repo (correct me, guys if I am mistaken)
That's cool!