👋 Email us at [email protected] with questions or feedback. We'd love to hear from you. If you have an account with RWX, view your support page for access to support via Slack.

Access Tokens

Currently, Access Tokens are used for:

Generating an Access Token

  • Navigate to your Access Tokens settings page
    • Log in to RWX
    • From the hamburger navigation menu, select "Manage {organization}"
    • Click on "Access Tokens" on the menu on the left
  • Click "Create new"
  • Enter a description, such as "GitHub Actions"
  • Click "Create token"
  • Copy the Access Token (we'll use it in the next section)

GitHub Actions

If using GitHub Actions, store your Access Token in your Actions secrets to make it available in your builds:

  • On your organization settings page in GitHub, look for the Security section. Expand the Secrets menu, and then click on Actions.
  • Click on the "New organization secret" button
  • Enter RWX_ACCESS_TOKEN for the name
  • Paste the Access Token that you generated for the Value
  • Set the Repository access appropriately for the repositories you'd like to integrate into Captain or ABQ
  • Click Add secret

see GitHub's documentation for more information.

CircleCI

Circle has two approaches to setting environment variables: context and project. We recommend using contexts as it allows you to share the token across multiple workflows.

  • On your organization settings page, click on "Contexts"
  • Click on "Create Context" and give it a name. In our documentation, we use a context named "rwx". If you use that name, it'll be easier to copy/paste our example workflows
  • Click on the context, then click "Add Environment Variable"
  • Enter RWX_ACCESS_TOKEN in the "Environment Variable Name" field
  • Paste the Access Token into the "Value" field

GitLab

You can set environment variables in GitLab's variable settings. For ease of sharing it across projects, we recommend setting it at the instance-level if self-hosting GitLab or at the group level if using hosted GitLab. Here's how to do it for on a group:

  • On your group's page, hover over "Settings" in the menu on the left and click on "CI/CD"
  • Click on "Variables" to expand it, and then click on "Add Variable"
  • Enter RWX_ACCESS_TOKEN in the "Key" field
  • Paste the Access Token into the "Value" field
  • Leave "Type" set to "Variable" and "Environment scope" set to "All"
  • Ensure that only "Mask variable" is checked ("Protect variable" flag will prevent the CLI from working properly for feature branches. "Expand variable reference" is unnecessary.)

Recovering an Access Token

We do not store Access Tokens in our system; we only save digests. Therefore, we cannot recover a lost Access Token. If you misplaced a token, generate a new one.

Rotating an Access token

You can have as many Access Tokens as you'd like. To rotate a token:

  • Generate a new token per the instructions above
  • Switch your integration to use the new token
  • Log into RWX and revoke the old token