Skip to main content
Connect Private Packages
Go - Private Packages

Go - Private Packages

Aikido's autofix can be configured to support repositories which use private go packages hosted on GitHub or GitLab. To enable it, follow the steps below.

  1. Navigate to the autofix settings page and click on "Manage Private Registry Connection"

  2. Select "Go" from the tabs

  3. Enter the private registry host, this is the hostname with the path to the repo where the package is being hosted. Aikido will expose this as the GOPRIVATE env variable during the update process.

    1. eg for GitHub: github.com/[ORG]/[REPO]

    2. eg for Gitlab: gitlab.com/[ORG]/[REPO]

      Since Aikido uses this value to set the GOPRIVATE environment variable, this can also be a list of comma-separated glob patterns of module path prefixes that should be considered private.

  4. Next create a personal access token in either GitHub or Gitlab with read-only access for that repository and it to the token field

  5. Click on "Apply Changes"