Last Reviewed: 2026-09-22
Terminus Guide
Authenticate Terminus in a CircleCI Pipeline
Learn how to authenticate Terminus in a CircleCI pipeline without errors.
This section provides information on how to authenticate Terminus in a CircleCI pipeline without receiving errors and avoiding authentication rate limits.
Caching Authentication for CircleCI Pipelines
You can use the example script in this section for a full start-to-finish Terminus authentication in CircleCI. This pipeline does the following:
- Defines an executor with an Ubuntu environment, which installs PHP.
- Defines a command
install_dependencieswhich does the following:- Checks out the code.
- Installs necessary packages.
- Restores cache of
~/.terminusfolder if it exists. - Fetches the latest version of Terminus from the GitHub API.
- Installs Terminus and adds its path to the environment variable
$PATH. - Saves the cache for the
~/.terminusfolder. - Authenticates Terminus.
- Validates Terminus is logged in.
- Defines a job
buildthat uses theinstall_dependenciescommand. - Defines a workflow that executes the
buildjob.
Information:
Note
Before you use this script:
- Replace
TOKENin the script below with a Personal Access Token. - Add the Personal Access Token to your environment variables in the CircleCI project settings.
- Personal Access Tokens expire 90 days after creation — rotate this secret before it lapses, or the pipeline will start failing auth.