Importing a third-party repository requires an account and an access token for authentication. The account should be the same one used for cloning over HTTPS on the specified platform. This topic describes how to obtain an access token from common code hosting platforms.
You typically manage access tokens in the personal account settings of a code hosting platform. This topic describes how to obtain access tokens for the following third-party platforms:
-
GitLab
Obtain a GitLab access token
This example uses public GitLab. The procedure may vary slightly depending on your version:
-
Log in to GitLab. In the upper-right corner, click your avatar, and then select Edit Profile.
-
In the left navigation pane, select Access Tokens:
-
Enter a Token Name, for example,
forcodeup. -
In the Scopes section, select the
read_repositorycheckbox. -
Click Create personal access token.
NoteIf you are importing from a self-managed GitLab instance, ensure the token has at least the following permissions. You may need to expand the authorization scope to include them:
-
api -
read_user -
read_repository
-
-
After the token is created, copy and save it.
At the top of the page, in the Your new personal access token section, click the copy icon next to the token value to copy it. The token is displayed only once and cannot be retrieved after you leave the page.