ARTIFACTORY: How to proxy the “https://go.dev” GO upstream URL through Artifactory

ARTIFACTORY: How to proxy the “https://go.dev” GO upstream URL through Artifactory

AuthorFullName__c
Sandeep Anikapati
articleNumber
000006030
ft:sourceType
Salesforce
FirstPublishedDate
2024-02-08T10:23:37Z
lastModifiedDate
2024-02-08
VersionNumber
2

This article will demonstrate how to proxy the “https://go.dev” GO upstream URL via Artifactory.

Currently, there is no option to proxy the https://go.dev/dl URL through the GO remote repository. As you are aware, Artifactory's remote Go repository only serves as a caching proxy for golang.org, GitHub.com, and another Artifactory Go repository.

As an alternative, we can use the Generic remote repository to get packages from the go.dev registry using Artifactory.

1) Create a generic remote repository pointing to this URL “https://go.dev/dl/”.

User-added image

Next step, follow the Set Me Up instructions to download the packages from the go.dev registry.

The sample curl command for downloading the packages is shown below.
Eg: 

curl -L -uadmin:'password' -L -O "https://<artifactory_url>/artifactory/<repo-name>/go1.10.1.freebsd-amd64.tar.gz"


User-added image

For more information on GO and Generic Repositories, you can refer to the below documentation:-