All Products
Search
Document Center

Alibaba Cloud DevOps:How do I obtain an access token?

Last Updated:May 16, 2025

When importing a third-party repository, you usually need to specify a username and access token for authentication. The username refers to the username of the account registered on the specified code hosting platform and used for HTTP cloning. The access token is the authentication credential. This topic describes how to obtain access tokens for common third-party code hosting platforms.

Access tokens are usually managed and configured in the personal account settings of the code hosting platform. This topic describes how to obtain access tokens for the following third-party platforms:

  • GitLab

Obtain a GitLab access token

This section uses the public GitLab as an example. The exact steps may vary depending on your GitLab version. Follow the instructions specific to your installed version.

  1. Log on to GitLab. Click the menu in the upper-right corner, and select Edit Profile.

    1-6

  2. In the left-side navigation pane, click Access Tokens.

    • Enter a token name, such as forcodeup.

    • Select read_repository in the Select scopes section.

    • Click Create personal access token.

    1-7

    Note

    If you import repositories from a self-managed GitLab instance, the token needs to have at least the following permissions. Make sure to correctly configure the authorization scope:

    • api

    • read_user

    • read_repository

  1. Copy and save the generated access token.

    1-8