Updated on 2023-08-07 GMT+08:00

Managing Self-hosted Repos

You can edit repository descriptions, add paths, delete repositories, and manage user permissions.

Editing Repository Descriptions and Paths

  1. Access the self-hosted repo homepage. In the left pane, click the name of the repository to be edited.
  2. Click Settings on the right of the page to display the basic information about a repository.
  3. Edit the repository description as required and click Submit.

    On the Basic Information tab page, the repository name and repository format cannot be modified.

    On the Basic Information page of the repository, enter the path and click to add paths for the npm, Go, PyPI, and RPM repositories.

    Click to delete a path.

Configuring Deployment Policies

The self-hosted repo supports three version policies: Allow redeploy, Disable redeploy, and Read-only. You can set whether to allow artifacts in the same path to be uploaded and overwrite the original package.

  1. Access the self-hosted repo homepage. In the left pane, click the repository name.
  2. Click Settings on the right of the page. The basic information about the repository is displayed. Click the Deployment Policies tab.

    • Allow redeploy (selected by default): Artifacts in the same path can be uploaded. After being uploaded, the original package will be overwritten.
    • Disable redeploy: Artifacts in the same path cannot be uploaded.
    • Read-only: Artifacts cannot be uploaded, updated, or deleted. You can download an uploaded artifact.

  3. Click OK.

Deleting a Repository

You can delete a self-hosted repo. Deleted repositories are moved to the recycle bin.

  1. Access the self-hosted repo homepage. In the left pane, click the name of the repository to be deleted.
  2. Click Settings on the right of the page to display the basic information about a repository.
  3. Click Delete. Check that the deleted repository is no longer displayed in the repository list in the left pane.

Managing User Permissions

The tenant account can add members to or delete members from a self-hosted repository. The administrator of each repository can manage roles of the members in the repository.

This section describes how to set user permissions only for the existing self-hosted repo of the old version.

  1. Click the username in the upper right corner, and select All Account Settings from the drop-down list.
  2. In the left navigation pane, choose Artifact > User Permissions.
  3. Click Add Member, select a member, and click OK.
  4. Assign roles to the member.

    1. In the Operation column of the target member, click .
    2. Click the Assigned tab.
    3. Select the desired repositories and roles, and click OK.
      Figure 1 Assigning repository roles

A tenant administrator can add members to or delete members from a self-hosted repo and manage the roles of members in the repository.

The following table lists the operation permissions of each repository role.

Operation/Role

Tenant Administrator

Non-Tenant Administrator

Repository Administrator

Developer

Viewer

Repository Administrator

Developer

Viewer

Create a self-hosted repo

×

×

×

Edit a self-hosted repo

×

×

×

×

×

Manage the association between repositories and projects

×

×

×

Upload a private component

×

×

Download a component

Delete a component

×

×

Restore a component

×

×

Permanently delete a component

×

×

Delete a repository

×

×

×

×

×

Restore a repository

×

×

×

×

Permanently delete a repository

×

×

×

×

×

Clear recycle bin

×

×

×

Restore all

×

×

×

Manage user permissions

×

×

Reset the password of a public account

×

×

×

You can also perform the following operations on the Set User Permissions page.

Operation

Description

Delete members

To delete a member, click in the corresponding row. To delete multiple members, select them and click Delete.

Modify member permissions

Click . In the displayed dialog box, select the repository name, and click OK.

View members

Select the package type and repository name in the upper left corner of the page. The member list of the repository is displayed.

Click Reset in the upper part of the page to view the list of all members.

Remove a member

Select a repository and click in the member list to remove the member from the repository.

NOTE:

Removing a member from a repository does not affect the role and permissions of the member in other repositories.

Deleting a member is to remove it from all the related repositories. The corresponding permissions of the member for those repositories are also deleted.

Search for a member

Enter a member name or keyword in the search box in the upper part of the page and click to search for a repository member.

Reset the password of a public account (This function is available only to tenant administrators.)

The password of a public account is used by the CodeArts Build to upload and download components to the self-hosted repo and is invisible on the page. Click Reset Public Password in the upper right corner of the page to reset the password.

Set-Up

You can connect the self-hosted repo to a local development environment so that private components in the self-hosted repo can be used during local development.

  1. Access the self-hosted repo homepage. In the left pane, click the name of the repository to be connected to the local development environment.
  2. Click Set Me Up on the right of the page.
  3. In the displayed dialog box, click Download Configuration File to download the configuration file to your local directory.
  4. Copy the downloaded file to the corresponding directory based on the instructions in the Information dialog box.

Resetting the Repository Password

You can reset the password in the self-hosted repo configuration file. After the password is reset, download the configuration file again to replace the original file.

  1. Access the self-hosted repo homepage. Click above the repository list on the left and choose Reset Repository Password.

  2. In the displayed dialog box, click OK. Check that a message is displayed indicating the password has been reset.

Obtaining the Self-hosted Repo Path

The path of the self-hosted repo will be used when you connect the repository to the local development environment. You can perform the following operations to obtain the path:

  1. Access the self-hosted repo homepage. In the left pane, click the repository name.
  2. The path of the self-hosted repo is displayed in the repository details on the page. You can click to obtain the path.

Managing the Association Between the Self-hosted Maven Repo and Project

When uploading a Maven component to the self-hosted repo through a build task, specify the repository path in the Build with Maven step.
  • Do not configure POM: The dependency package is not released to the self-hosted repo.
  • Configure all POMs: If you run the mvn deploy command, the dependency package is released to the specified release repository and snapshot repository.

After the self-hosted Maven repo is associated with a project, you can select the repository in the build step of the build task in the project.

  1. Access the self-hosted repo homepage. In the left pane, click the name of a self-hosted Maven repo.
  2. Click Settings on the right of the page, and choose Project Associations.
  3. In the Operation column of the target project in the self-hosted Maven repo, click .
  4. In the displayed dialog box, select the repository name, and click OK.

    After an "Operation successful" message is displayed, the value of Associated Repositories for the project will be updated according to the number of selected repositories.