Create API token in Argo CD
Last updated
Last updated
This doc helps users to create a token in Argo CD. Argo CD account should have API key permission with RBAC admin role assigned, to generate the token. By Default Argo CD has an Admin account created with RBAC admin permission. If required, create a new account for Argo CD with API Key and RBAC permissions. For detailed information, refer here.
In order to generate tokens from Argo CD, your account should have the "API Key’’ permission. If you don't have sufficient permission, please use the following command to update it.
Note: Replace the “accounts.admin" in the above command with your account as appropriate.
Login to Argo CD UI. Your Argo CD account should have API Key permission with the RBAC admin role assigned.
In the Application Dashboard, click on the “Settings” icon in the left-side navigation pane and then click on “Accounts”. Refer to the image below.
Select the user and click on “Generate New”. Refer to the image below:
Now you will get a token. Copy that token and encode it to base64 format from your command line. If you are not able to encode it from the command line, use any online encoding site such as https://www.base64encode.org/.
Login to Argo CD via CLI by executing the below code and provide your username and password when prompted.
Generate the token to the account by executing the below code.
For example, the token in the output appears as shown below.
After generating the token, copy it and encode it in base64 format from your command line. If you are not able to encode it from the command line, use any online encoding site such as https://www.base64encode.org/.
sss