Problem using Git (Bitbucket) after Atlassian switched to API Tokens

Atlassian have switched off the ability to use app passwords to access Bitbucket cloud repositories and replaced them with api tokens.

We’d created api token’s previously and believed we had tested them with our build process however it appears FinalBuilder was still using cached app passwords as when we tried a build today after they had switched off app passwords we were unable to perform the git pull within FinalBuilder.

Is this a case of user error (in which case is there any guidance as to how we need to setup to use api tokens) or a bug?

Cheers

Hi Paul

I managed to get it working but it took some time before I figured it out (after spending an hour just getting into my bitbucket account!)

First up, enable the built in credential helper on the action

In the repository url, replace your username with x-token-auth

eg

https://finalbuilder@bitbucket.org/finalbuilder/testytest.git
becomes
https://x-token-auth@bitbucket.org/finalbuilder/testytest.git

In the credentials tab, enter your user name and in the password field your access token.

Your access token needs the following scopes

Operation Required scopes
Clone read:repository:bitbucket
Push read:repository:bitbucket + write:repository:bitbucket
Pull requests read:pullrequest:bitbucket (and write:pullrequest:bitbucket if creating/updating PRs)