GuidesAPI reference
DiscordDashboard
DiscordDashboard

Pipeline CLI authentication

How to authenticate with Pipeline CLI

You can use the Pipeline CLI to authenticate and store your API credentials in your local directory ~/.cache/pipeline/. PipelineCloud will then authenticate using these credentials, saving you the trouble of having to export environment variables for every new shell, e.g. PIPELINE_API_TOKEN.

👍

Check your environment

If you have previously added your PIPELINE_API_TOKEN to you environment, make sure to remove it before authenticating with the CLI.

In linux/macos, you can check whether you have set PIPELINE_API_TOKENwith;

echo $PIPELINE_API_TOKEN

And if the output from the above command is not empty, you can remove it with;

unset PIPELINE_API_TOKEN

Simply run

pipeline remote login -u https://api.pipeline.ai -t YOUR_API_TOKEN

with a valid API token. If you need a new token, you can create one in your dashboard.

You should now find a file at ~/.cache/pipeline/auth.json, which looks something like:

{"https://api.pipeline.ai": "U29ycnkgSSBnb3QgeW91ciBob3BlcyB1cAo="}

where the key represents the remote compute service URL and the value represents your base64-encoded API token.