Updated on 2026-09-15 GMT+08:00

Configuring an Access Token

Introduction

Access tokens can keep your code resources secure. When you authorize a third party to access your repository, you can create an access token and set its validity period to avoid exposing your account and password.

Constraints

Table 1 Constraints

Item

Description

Number of access tokens

A maximum of 20 tokens can be created for CodeArts Repo.

Validity period

One month by default. Max. one year. You can set the validity period of an access token as needed.

Single-time visibility

As shown in the following figure, after the dialog box is closed, the access token is not displayed. Keep the access token properly. If you lose or forget the access token, you can generate a new one.

Configuring an Access Token

  1. Access the CodeArts Repo repository list page and click the alias in the upper right corner.
  2. Choose This Account Settings > Repo > Access Tokens.
  3. Click New Token and set parameters by referring to Table 2.

    Table 2 Description

    Parameter

    Description

    Token Name

    Custom name with a maximum of 200 characters.

    Description

    Optional. If the description is empty, -- will be displayed in the list. Max. 200 characters.

    Permissions

    This parameter is selected by default and cannot be modified. Read/Write repo: Read from and write into repositories using HTTPS.

    Expires

    Time when a token expires.

    The default expiration date is set to 30 days from the current date, including the current day. For example, if a token is created on July 3, the default expiration date will be 23:59:59 on August 2. The expiration date can be set to one year from the creation date and cannot be left empty.

  4. After setting the parameters, copy and save the token. To use the token, see Follow-up Operations.

Follow-up Operations

After configuring the token, you can run the following command to clone the repository to the local host:

git clone https://private-token:Your Token@example.com/repo_path.git
  • Your Token: the copied token
  • example.com/repo_path.git: If the HTTPS clone address of the repository is https://example.com/repo_path.com, the content following https:// is example.com/repo_path.git.