Wiki source code of Create HTTP Access Token for project or repository access
Version 1.3 by Boris Folgmann on 2026/02/03 12:02
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | The DevOps Portal allows you to create technical users on Bitbucket to which you can assign roles in different projects. The disadvantage is, that one Bitubucket license will be occupied by this technical user. Therefore, as an alternative consider creating a HTTP Access Token. It's suitable if access permissions for a single project are sufficient. It's also very suitable if you are explicitly interested in limiting the access to a single git repository. | ||
| 2 | |||
| 3 | To create such a HTTP access token opne the settings of the Bitbucket project or repository. In the Security section click on "HTTP access tokens". | ||
| 4 | |||
| 5 | |||
| 6 | |||
| 7 | |||
| 8 | Due to security reasons, you cannot use your password inside a git client when you connect to Bitbucket. Instead, you have to use an HTTP Access Token. To generate one, log in to the DevOps Portal and click "HTTP Access Tokens" in the Bitbucket tile of the dashboard. See screenshot below: | ||
| 9 | |||
| 10 | [[image:1723636654762-377.png||height="197" width="393"]] | ||
| 11 | |||
| 12 | The vendor documentation well describes [[How to create HTTP access tokens on Bitbucket>>url:https://confluence.atlassian.com/bitbucketserver089/http-access-tokens-1236435579.html]], but does not specify which Project and Repository permissions should be chosen for git clients. | ||
| 13 | |||
| 14 | Normal git clients will not interact with the proprietary APIs of Bitbucket, e.g. for handling pull-requests. Instead, git clients just use the standardized git protocol for actions like git clone, pull, and push. The recommended settings for an HTTP access token following the least-privilege principle are: | ||
| 15 | |||
| 16 | //Project read// and //Repository write//. See the following screenshot: | ||
| 17 | |||
| 18 | [[image:1718784695894-646.png||height="586" width="526"]] |