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
    Posted June 20, 2012 at 10:11 am | Permalink

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

    Thanks in advance.

    • Posted June 20, 2012 at 1:34 pm | Permalink

      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
    Posted June 20, 2012 at 10:30 am | Permalink

    Thanks! This will help us A LOT! 

  • Cp
    Posted June 24, 2012 at 7:59 am | Permalink


    bitbucket is useful, and it’s free

  • Posted June 29, 2012 at 6:36 pm | Permalink

    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
      Posted February 6, 2013 at 6:05 pm | Permalink

      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
    Posted July 14, 2012 at 4:15 pm | Permalink

    Great feature, very useful

  • Posted January 23, 2013 at 6:15 am | Permalink

    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
    Posted September 5, 2013 at 4:13 pm | Permalink

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

One Trackback