Proxy GitHub Enterprise with Go

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

Go Proxy Best Practice: Add Mirror Repository

JFrog highly recommends that you create a remote repository pointing to the default Go mirror (proxy.golang.org) and enter Artifactory as the Git provider. This way, Artifactory will be able to resolve cached public modules without querying the external registry, reducing the chance of rate limiting. For more information, see Set Up Go Proxy Mirror Repositories.

To create a remote repository that serves as a caching proxy for GitHub Enterprise, follow these steps:

  1. Create a new remote repository and set Go as the Package Type.

  2. Set the Repository Key value, and enter your local GitHub Enterprise URL in the URL field.

  3. Enter the username and personal access token that provides authentication to GitHub Enterprise. For more information about creating a personal access token, see Generate a Personal Access Token in GitHub Enterprise.

    Go-proxy_GitHubEnterprise_blur.png
  4. Scroll down to Go Settings and select a Git Provider:

    • For On-Prem, select GitHub Server.

    • For Cloud, select GitHub Cloud.

  5. Click Save & Finish.