Deployment Keys Now Available on Bitbucket

By on June 20, 2012

We’ve received a lot of requests for this feature, and our recent Innovation Week has given us the time to follow through on this request. We’re pleased to introduce Deployment Keys for Bitbucket.

Deployment keys allow users to clone/pull source from a repository over SSH using Git and Hg without having to use up one of their plan limit users. Deployment keys are similar to adding SSH keys to your account, but they are done on a per-repository basis. You can add the same deployment key to multiple repositories, but you will not be able to add a key that is already in use as an SSH Key for an account. Conversely, you will not be able to add an account SSH key that is already in use as a deployment key. Deployment Keys are particularly useful when you need to authenticate a build server to checkout and test your code.

To add a new deployment key, simply enter a repository’s Admin settings and click Deployment Keys on the left hand menu.

To find out more about SSH, check out our documentation on this security protocol.

We are very proud of what we have accomplished in our first Innovation Week. As we continue to gain more experience with this added week of development, we hope to ship some more awesome features to the public in the very near future. It’s an exciting time at Bitbucket – stay tuned!

  • mt

    Is there a link to “best practices” or for various use cases where one way is preferred over the other?

    Thanks in advance.

    • http://www.bitbucket.org Justen Stepka

      Deploy keys are ideal for build servers such as Bamboo or Jenkins.

      Deploy keys allow you to add a read only key to Bitbucket on a repo level limiting access. The reason this is ideal is because your account level key will have read / write access to all your repos.

  • Thierry Joyal

    Thanks! This will help us A LOT! 

  • Cp

    陈鹏个人博客

    bitbucket is useful, and it’s free

  • http://www.economyofeffort.com *Legion*

    Great feature – but, just like with services, this desperately needs a way to be set as an account-wide default.

    With a deployment user, we set this thing exactly once – make that user a read-only team member, and now we’re done.

    To use this feature, we’d have to tediously go to each repo, one at a time, and add the key. And then when we make new repos, we have to go do it to the new repos too.

    • sean head

      I was `just` trying to figure out how to do exactly this. I’ve started using subrepos for some things and now if I want to hook CI into things I need to add this to 30+ repos..

  • Nick

    Great feature, very useful

  • http://www.facebook.com/rada.bogdan Rada Bogdan

    what if i want administrator privileges to my own repository? i tried adding my ssh key as a deployment key but then i can only clone the repository , and if i add it also as a SSH key it is still read-only.

    I tried it also puting only as a SSH key but then i get this error:

    repository access denied. deployment key is not associated with the requested repository

    So how is this thing suppose to work actually? I really need some help

  • BLE

    Is there a way to indicate a BitBucket username instead of an ssh public key to grant read-only access to a single repository?