Skip to main content

Authentication in ArvanCLI

After installing ArvanCLI and before you start using it, you need to authenticate. In this guide, we look at how to log in, manage profiles, and log out.

Logging In to ArvanCLI​

To log in to the CLI, use the following command:

arvan auth login

After running this command, enter the access key you get from your machine user.

To use ArvanCLI, you need to create a machine user and get its access key. The Machine User guide helps you with this.

After you log in, ArvanCLI creates a profile for the key and workspace you entered. This profile contains confidential information such as the machine user key, which is stored securely on your system.

All the operations you do in ArvanCLI are actually done by the machine user whose key you registered in the CLI. So make sure the machine user has the IAM permissions needed for the operations. The guide to managing access in your Arvancloud account helps you with this.

Managing Profiles in ArvanCLI​

To see the profiles created on your system and check their details, use the following command:

arvan auth list

This command shows the list of created profiles with the details of each one. These details include the workspace ID and name.

Registering more than one key from the machine users of the same workspace creates profiles with the same workspace ID and name, even though different keys and machine users may be registered in each of these profiles.

Profiles are stored in a specific structure as ArvanCLI configuration files, but their sensitive information, which is the access keys, is stored securely in each operating system's Credential Manager.

Logging Out of ArvanCLI​

To log out of the current profile, run the logout command:

arvan auth logout

Running this command deletes the current profile. If there are other active profiles on your system, one of them is selected as the active profile for ArvanCLI.