Bitbucket has a detailed guide on generating app passwords.
Make sure you have 2FA activated on your account.
- Go to bitbucket setting on your account
- Go to app password and create password
- Use your bitbucket username and this app password for authentication.
<BitbucketUserName>:<AppPassword>
- Use an app password for pipelines that has the minimum set of permissions.
Detailed guide to get travis token from travis blog