To build images, you must first bind a source code hosting platform. This topic describes how to bind a Personal Edition instance to a source code hosting platform.
Prerequisites
-
You have an account on a source code hosting platform.
-
You have created a Personal Edition instance. For more information, see Create a Personal Edition instance.
Background information
Container Registry Personal Edition instances support the following source code hosting platforms:
|
Code platform |
Platform version |
Binding method |
Build trigger limits |
|
Codeup |
All |
personal access token |
None |
|
GitHub |
GitHub personal account only |
GitHub OAuth authorization |
None |
|
Bitbucket |
All |
Bitbucket OAuth authorization |
None |
|
GitLab |
All |
personal access token |
None |
Bind your personal instance to Codeup
Create a personal access token for Alibaba Cloud Codeup.
Log on to Codeup.
On the Apsara Devops Codeup page, click your personal account and then click Personal Settings.
In the navigation pane on the left of the Personal Settings page, click Personal access token.
Click New Token. Set the Token Name and Expired At. Select the permissions to grant, and then click New. Read the Security Tip and then click OK, I understand the risks.
The following list describes the least privilege required to create an access token.
Organization Management
Organization members: read-only
Organization departments: read-only
Code Management
Code repositories: read-only
Branches: read-only
Tags: read-only
Webhook: read/write
After the token is created, it is displayed on the page.

-
Find your HTTPS clone username.
In the left-side navigation pane of the Personal Settings page, click HTTPS Password to view your clone username.
-
Bind your instance to Codeup.
Log on to the Container Registry console.
In the top navigation bar, select a region.
In the left-side navigation pane, click Instances.
-
On the Instances page, click the target Personal Edition instance.
-
In the left-side navigation pane of the instance management page, choose .
-
On the Code Source page, find Codeup and click Bind Account in the Actions column.
-
In the dialog box that appears, set the parameters and click Confirm.
On the Code Source page, a Bound status in the Actions column for Codeup indicates a successful binding.
Bind your personal instance to GitHub
Log on to the Container Registry console.
In the top navigation bar, select a region.
-
In the left-side navigation pane, click Instances.
-
On the Instances page, click the target Personal Edition instance.
-
In the left-side navigation pane of the instance management page, choose .
-
On the Code Source page, find GitHub and click Bind Account in the Actions column.
-
In the GitHub dialog box, click Go to the source code repository to bind account.
-
On the GitHub sign-in page, enter your username and password, and then click Sign in.
-
On the Authorize Aliyun Container Registry page, review the requested permissions and click Authorize AliyunDeveloper.
Return to the Container Registry console. The message You have successfully linked your GitHub account is displayed, which indicates that the binding is successful.
Bind your personal instance to Bitbucket
Log on to the Container Registry console.
In the top navigation bar, select a region.
-
In the left-side navigation pane, click Instances.
-
On the Instances page, click the target Personal Edition instance.
-
In the left-side navigation pane of the instance management page, choose .
-
On the Code Source page, find Bitbucket and click Bind Account in the Actions column.
-
In the Bitbucket dialog box, click Go to the source code repository to bind account.
-
On the Bitbucket page, enter your email address and click Continue. Then, enter your password and click Logon.
-
On the Confirm access to your account page, review the permissions and click Grant access.
Return to the Container Registry console. The page displays the message You have successfully bound your Bitbucket account, which confirms that the binding was successful.
Bind your personal instance to GitLab
If you use a self-managed GitLab instance, take note of the following port requirements when you bind your instance:
-
HTTP service
Port 80 is used by default. If you use a different port, you must manually add the port number to the end of the trigger URL. Only the following ports are supported: 80, 21, 443, 70, 210, 280, 488, 591, 777, and 1025 to 65535.
-
HTTPS service
Port 443 is used by default and is the only port supported for HTTPS. To use a non-default port, you must use the HTTP service.
-
GitLab instances behind a firewall or that use a self-signed HTTPS certificate are not supported. Your GitLab instance must be accessible from the internet.
-
If you bind your Personal Edition instance to a GitLab repository that is in a subgroup, you can only manually trigger image builds.
-
Create a personal access token in GitLab.
-
Sign in to GitLab.
-
On the GitLab page, click your user profile, and then click Settings.
-
In the left-side navigation pane of the User Settings page, click Access Tokens.
-
On the Access Tokens page, enter a name, set an expiration date, select the api scope, and then click Create personal access token.
After the token is created, you can view it on the Access Tokens page.

-
-
Bind your instance to GitLab.
Log on to the Container Registry console.
In the top navigation bar, select a region.
In the left-side navigation pane, click Instances.
-
On the Instances page, click the target Personal Edition instance.
-
In the left-side navigation pane of the instance management page, choose .
-
On the Code Source page, find GitLab and click Bind Account in the Actions column.
-
In the dialog box that appears, set the parameters and click Confirm.
-
Address: Enter the sign-in URL of your GitLab instance.
-
If you use a self-managed GitLab instance, enter its sign-in URL.
-
If you use a public GitLab instance, enter its sign-in URL.
-
-
Username: Enter your GitLab username.
-
Personal Access Token: Enter the personal access token created in Step 1.
On the Code Source page, a Bound status in the Actions column for GitLab indicates a successful binding.
-
Related topics
If the binding fails, refer to the following topic for troubleshooting: FAQ about source code repositories.