Create HTTP Access Token for project or repository access
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 an 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.
To create such an HTTP access token open the settings of the Bitbucket project or repository. In the Security section click on "HTTP access tokens". The page will look like shown in the screenshot below.

Now click on "Create token" and create the token with the required permissions.
To use the token for communicating with Bitbucket for automation tasks make sure to authenticate like this:
- Username: "x-token-auth" (static text)
- Password: value of the access token
DevOps Portal 2.2.0 and later uses the same approach to allow Jenkins to retrieve the source codes from Bitbucket projects.