Updated on 2026-08-03 GMT+08:00

Authorization

In CodeArts Agent CLI, you can perform authorization by configuring process-level variables or system environment variables. The process-level configuration is used for temporary authorization, and the system environment variable configuration is used for permanent authorization.

Preparations

  1. Create access keys by referring to Access Keys.
  2. In the Create Access Key dialog box, select the agreement check box and click Next. Enter a description for the access key and click OK.

    After the access key is created, download it and keep it secure. Once the dialog box is closed, the key cannot be obtained.

  3. Configure environment variables based on your operating system (see the following). Obtain the values of Access Key Id and Secret Access Key from the downloaded credentials.csv file.

Windows

The following describes how to perform authorization by configuring process-level variables and system environment variables in Windows.

macOS

The following describes how to perform authorization by configuring process-level variables and system environment variables in macOS.

Linux

You can select an authorization method as required.

Table 1 Comparison of different authorization methods

Authorization Method

Effective Scope

Lifecycle

Applicable Shell

Permission Requirements

Typical Scenarios

Temporary process authorization

Current terminal window only

Expires immediately after the terminal is closed; cleared upon a server restart

bash, zsh, and sh

Common users

Temporary debugging, one-off tests, and temporary script execution, without the need to retain keys

Permanent Bash user authorization

Currently logged-in users and all new terminals

Persists permanently; remains effective after a terminal or server restart

Linux default Bash (CentOS, Ubuntu, or Kylin)

Common users

Personal servers, frequent daily use, operations only performed by the user