How to use a Personal Access Token (PAT) to publish Bamboo Specs changes

Platform Notice: Data Center Only - This article only applies to Atlassian products 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 in place of the traditional username and password.

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 username and password properties so changes can be pushed back to Bamboo by using such values.

1 2 3 [bamboo-specs]$ cat .credentials username=admin password=abc123

In case you wish to use a Personal Access Token (PAT), you'll have to:

  1. Create a Personal Access Token in Bamboo – Make sure you set the correct permissions, otherwise the publish task may fail

  2. Have your Specs code ready for publishing

  3. Within your project, modify the bamboo-specs/.credentials file and replace the username and password properties with a single token key containing your new PAT:

    1 2 [bamboo-specs]$ cat .credentials token=MzrfTTY5NTQ0NTabcmvLMJdfm6SFvX123xaKfDV45670
  4. Publish the changes normally using Maven or your IDE

If you specify a token there's no need to keep the username and password fields in the file. But you can comment then out if you prefer that way. A token will take preference in the usage.

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:

Updated on April 24, 2025

Still need help?

The Atlassian Community is here for you.