Generating a Token For CI/CD Integration

Qubit CLI supports token-based authentication for use inside of CI/CD environments. This enables use cases such as automated unit testing, pushing, and publishing of experiences from within tools such as CodeShip, Jenkins, or CircleCI.

In this article we will cover how you go about generating a long-lived token. When done, the CLI will use the token for authentication rather than a user login.

In the event that your token is compromised, we will also show you how to revoke it.

Generating a token

Step 1


qubit token

DANGER: Keep this token safe as it gives the CLI access to the Qubit platform.

Step 2

Inside your build system, export the token as an environment variable named QUBIT_TOKEN:

export QUBIT_TOKEN=[token]
  • Where [token] is the token value

The build system can now install packages from the Qubit managed NPM registry, access the platform to push/pull code, or perform any other function such as publishing.

Revoking a token


qubit revoke [token]
  • Where [token] is the token value

TIP: You can find more details via qubit --help.

Last updated: January 2023
Did you find this article useful?