Authorize in Packages
Private and public repositories
Repositories in Space Packages are project-wide entities. There are two types of repositories:
Private | Only authorized users can access private repositories. The access is managed by the Package Repositories permissions group. By default:
|
---|---|
Public | All unauthorized users have Read permission to public repositories. |
To change the repository access type
Open repository settings.
Choose Public access or Private access.
To change repository access permissions for a role
Open Project Settings → Access.
In the list of roles on the left, choose the role for which you want to change access permissions.
Set required permissions in the Package Repositories group.
Authorization
Packages support a number of authorization ways:
Authorization | Use case |
---|---|
Using your Space username and password (Not recommended) | Accessing a repository with a tool like |
Accessing a repository with a tool like | |
Accessing a repository from an external service, for example, a CI/CD server. | |
No authorization (only public repositories) | Accessing publicly available repositories. |
To authorize with your Space user account
When asked for credentials, specify your Space username and password. We strongly recommend that you use a personal permanent token instead of a password:
To create a token, go to My Profile | Authentication | Personal Tokens and choose New personal token.
When creating the token, provide it as minimum permissions as possible:
In Token permissions, select Limited access.
With Add context, you may limit the token with access only to repositories of a particular project.
Edit the particular permission context: add Read package repositories and Write package repositories for giving Read and Write access correspondingly.
Copy the generated permanent token to a secure place.
When a tool or an application asks you for the password, you should specify this token instead.
To authorize with an application account
On the main menu, click
Extensions and choose Installed.
Click New Application.
Specify the account Name.
Click Edit requested rights and provide the account as minimum rights as possible. To work with Packages, only rights from the Package repositories group are required.
After the application is created, switch to the Authorization tab.
Click Add project and select projects. The account will get access only to the repositories of the selected projects.
Switch to the Permanent Tokens tab and click New permanent token.
Copy the generated permanent token to a secure place.
Open the Authentication tab and copy the Client ID field.
When a tool or an application asks you for credentials, specify the copied Client ID as a username and the generated permanent token as a password.