Authentication

Note that some commands are marked as (authenticated).

This means the operations performed communicate with the WP Git Updater API and the Git repository. They require the environment variables WP_GIT_UPDATER_TOKEN and WP_GIT_UPDATER_GIT_TOKEN to be available which are used for authentication.

The WP_GIT_UPDATER_TOKEN is your organisations token which can be found on the dashboard as well as in the organisation settings.

The WP_GIT_UPDATER_GIT_TOKEN is the token used to authenticate with the Git provider.

Each CI Provider may require or provide ways to consume a token generated as part of the CI process. These will be detailed in their respective sections.

However to run these operations locally if you wish to you will need to provide these tokens within your own environment.

You can set the environment variables in a few ways.

Current Cli Session

You can export variables for your current session using the following command:

export WP_GIT_UPDATER_TOKEN="***"
export WP_GIT_UPDATER_GIT_TOKEN="***"

Note that once your session has ended (terminal closed) these variables will be lost.

Persistent

To persist the environment variables:

echo "export WP_GIT_UPDATER_TOKEN=\"***\"" >> ~/.profile
echo "export WP_GIT_UPDATER_GIT_TOKEN=\"***\"" >> ~/.profile
source ~/.profile

You may also to use .bash_profile, .zsh, or .bashrc among others depending on your preference or system.