Skip to main content

Access Keys

What is an Access Key?

An Access Key is a token, that allows you to use Pergola via CLI without manually logging in. By using Access Keys, you can automate workflows on Pergola.

Access keys are directly linked to your Pergola user account. You have exactly the same rights and permissions with an Access Key as when logging in manually. You can have up to 2 Access Keys.

danger

Never share your Access Key with anybody!

Never commit it to a git repository or publish it elsewhere!

How to create an Access Key?

Example for Web UI

Navigate to your User Profile by clicking on your own name in the top-right corner and click on 'Profile': Open User Profile

Scroll down to the Access Key section and click on 'CREATE ACCESS KEY': Create Access Key

After confirming the appearing dialog, you have created your key. Make sure to immediately copy the information before you close the dialog, as it will be revealed only once.

Create Access Key

Proceed to How to use an Access Key.

Example for CLI

pergola create access-key

This will create an Access Key. Make sure you copy the information to a safe place, as the secret can no longer be retrieved later.

See pergola create access-key for details.

How to use an Access Key?

General usage

To use an Access Key with the Pergola CLI, you can add the access-key you created to any pergola CLI command.

For example, list your Projects via:

pergola list project --access-key 'my-key-id:some-super-secret123'

By using the Access Key, you are identified and authorized without logging in manually beforehand.

For automated usage, we recommend you store the Access Key outside your scripts in a safe place (e.g. an encrypted secret storage).

tip

It is recommended to surround the Access Key within single quotes (') as in the example above.

Access Key housekeeping

We recommend to regularly check on your Access Keys.

Rotate your Access Keys on a regular basis by creating a new one and temporarily disabling the old one. Once you are sure the old Access Key is not in use anymore, you can safely delete it.

In the Web UI, use the buttons in the Access Key section of your User Profile:

Disable or delete Access Key

Via CLI, use pergola disable access-key or delete access-key.