pipelines-as-code
pipelines-as-code copied to clipboard
Bitbucket server with bearer tokens
Hi, 👋🏻
I'm testing PAC with Bitbucket Server.
With a personal access token (username/token) I can get it to work fine.
I'm trying to test with a project bearer token, which doesn't require a username.
I know the bearer token works with curl
BEARER='bear_token_here'
PROJECT="project_name"
REPO="repo_name"
curl \
--insecure \
--header "Authorization: Bearer ${BEARER}" \
https://bitbucket.mycorp/bitbucket/rest/api/latest/projects/${PROJECT}/repos/${REPO}/commits
But when I define the Repository resource, I receive an error if I leave the username out, as shown here
I thought I might get away with a placeholder username, but looks like basicAuth is the only option at present when I look here
Have I missed an option somewhere to setup Bitbucket server with a Bearer token?
Thanks.
I think it's something we will have to fix...
@chmouel Is there any plans to look into this? Would be great to use Pipelines as code with Bitbucket without depending on a personal user token.