Updated on 2025-07-24 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. You can view the Constraints and configure access tokens by referring to Configuring an Access Token.

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

Log in to CodeArts Repo, go to the repository list page, click your account name in the upper right corner, choose This Account Settings > Repo > Access Tokens, click New Token, set parameters according to the following table, save and copy the configured token. For details, see Examples.
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.

Related Document

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 is the copied token.
  • 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.