How to use a Personal Access Token (PAT) to publish Bamboo Specs changes
Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
This article explains how to use a Personal Access Token with Bamboo Specs and Maven.
Environment
All Bamboo releases
Java Specs over Maven or IDE
Solution
The generic Bamboo Specs implementation creates a default .credentials file on the bamboo-specs folder that expects users to adjust its token .
To use a Personal Access Token (PAT), you'll have to:
Create a Personal Access Token in Bamboo – Make sure you set the correct permissions, otherwise the publish task may fail
Have your Specs code ready for publishing
Within your project, modify the
bamboo-specs/.credentialsfile and replace theusernameandpasswordproperties with a singletokenkey containing your new PAT:[bamboo-specs]$ cat .credentials token=MzrfTTY5NTQ0NTabcmvLMJdfm6SFvX123xaKfDV45670Publish the changes normally using Maven or your IDE
Supporting documentation
Here are some documentation pages that support that:
The Bamboo Java Specs is an open-source project licensed under the Apache 2.0 license, meaning you can always have a peek at it to find what you want and even modify it – why not submit a Pull Request too!? 😊 – in case you have a specific requirement that is not available. For example, for the token part. Here's an example for Bamboo Specs 9.2.5:
Was this helpful?