Access Token
About 197 wordsLess than 1 minute
All resources on the Cloud Native Build Platform (code repositories, artifact repositories, OpenAPI, etc.) require authentication via access tokens.
Creating an Access Token
After logging in, navigate to Personal Settings → Access Token → Add Access Token, and configure the following parameters:
- Token Name: Unique identifier
- Expiration Time: Token becomes unusable after expiration
- Scope of Use: Repository types the token can access
- Authorization Scope: Operational permissions
- Common Scenarios: Quick initialization of authorization scope based on usage scenarios
Default Permissions
After creation, access tokens have read-only permissions on public organizations/repositories/ registries/missions by default, no permissions on private repositories and registries, and no permissions on account-related operations by default. To access private resources, explicitly select the corresponding authorization scopes.
Usage
Accessing code repositories and accessing artifact repositories: Username cnb, password is the access token.
Accessing OpenAPI
Refer to: Open API
CI Temporary Tokens
Pipelines embed temporary tokens (automatically destroyed at the end of the pipeline), obtainable through the environment variable CNB_TOKEN.