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.
Run:
qubit token
DANGER: Keep this token safe as it gives the CLI access to the Qubit platform.
Inside your build system, export the token as an environment variable named QUBIT_TOKEN
:
export QUBIT_TOKEN=[token]
[token]
is the token valueThe 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.
Run:
qubit revoke [token]
[token]
is the token valueTIP: You can find more details via qubit --help
.