Access Token
About 154 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
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.