All Products
Search
Document Center

Platform For AI:Manage code sources

Last Updated:Mar 11, 2026

Create reusable code assets for model training tasks.

Prerequisites

  • Alibaba Cloud account: Full access to all operations without additional authorization.

  • RAM user: Must be added as a workspace member with an assigned role. For more information about permissions for each role, see Appendix: List of roles and permissions.

Create a code configuration

  1. Navigate to Code Configuration page.

    1. Log on to PAI console.

    2. In the left navigation pane, click Workspace List. On the Workspace List page, click the workspace name.

    3. In the left navigation pane of workspace page, choose AI Asset Management > Code Configuration.

  2. On Code Configuration page, click Create Code Configuration.

  3. On Create Code Configuration page, configure parameters.

    Parameter

    Description

    Name

    Code configuration name.

    Description

    Code configuration description. Helps distinguish between configurations.

    Visibility

    Code configuration visibility. Valid values:

    • Private: Visible only to you and administrators in this workspace.

    • Public: Visible to everyone in this workspace.

    Git Address

    Code repository address.

    Code Branch

    Code branch. Default is master.

    Code Commit

    Commit has higher priority than branch. If specified, branch setting is ignored.

    Git Username

    Required to access a private code repository.

    Code Source Access Token

    Required to access a private code repository. For information about obtaining a GitHub token, see Appendix: Obtain a GitHub token.

    Local Storage Path

    Path to which code is mounted. Default is /root/code/.

  4. Click Submit.

Operations

After creating a code configuration, you can delete it or modify its visibility.管理代码集

Appendix: Obtain a GitHub token

  1. Log on to your GitHub account.

  2. Go to GitHub Developer settings.

  3. On Personal access tokens page, click Generate new token in the upper-right corner.

  4. In text box under Note, enter a token name. In Select scopes section, select required permission checkboxes. To grant full access, select all permissions.配置Token信息

  5. Click Generate Token.

    Generated token is shown below.生成的Token