Configure automation hub tokens
You must create an API token before you can upload or download collections. The automation hub API token authenticates your ansible-galaxy client to the Red Hat automation hub server.
Automation hub does not support basic authentication or authenticating through service accounts. You must authenticate using token management.
Your method for creating the API token differs according to the type of automation hub that you are using:
- Automation hub uses offline token management.
- Private automation hub uses API token management.
- If you are using Keycloak to authenticate your private automation hub, follow the procedure for Create the offline token in automation hub.
Create the offline token in automation hub Copy linkLink copied!
In automation hub, you can create an offline token using Token management. The offline token is a secret token used to protect your content, so be sure to store it in a secure location.
About this task Copy linkLink copied!
Your offline token expires after 30 days of inactivity.
Procedure Copy linkLink copied!
- Navigate to Ansible Automation Platform on the Red Hat Hybrid Cloud Console.
- From the navigation panel, select .
- Under Offline token, click .
- Click the icon to copy the offline token.
- Paste the token into a file and store in a secure location.
What to do next Copy linkLink copied!
The offline token is now available for configuring automation hub as your default collections server or for uploading collections by using the ansible-galaxy command line tool.
Create the API token in private automation hub Copy linkLink copied!
In private automation hub, you can create an API token using API token management. The API token is a secret token used to protect your content, so be sure to store it in a secure location.
Before you begin Copy linkLink copied!
- Valid subscription credentials for Red Hat Ansible Automation Platform.
About this task Copy linkLink copied!
The API token does not expire.
Procedure Copy linkLink copied!
- Log in to your private automation hub.
- From the navigation panel, select .
- Click .
- To copy the API token, click the icon.
- Paste the API token into a file and store in a secure location.
What to do next Copy linkLink copied!
The API token is now available for configuring automation hub as your default collections server or uploading collections using the ansible-galaxy command line tool.