1

I have set up a Golang remote repository named "golang-remote" which points to https://proxy.golang.org.

When I tried to use it with go getby setting the GOPROXY to https://<artifactory-service-url>/artifactory/api/go/golang-remote, I got the error 400 Bad Request.

I'm not quite familiar with setting up a caching proxy for Golang packages, are there any wrong configurations to my remote repository or wrong usage?

Thanks in advance!

mayer
  • 77
  • 1
  • 7

1 Answers1

3

Artifactory only supports the resolution of Go packages from virtual Go repositories. To resolve Go from other local or remote Go repositories, you need to aggregate them in a virtual Go repository.

Create a virtual repo example: "go" and include the remote repository "golang-remote" to associate it with the virtual repo. Once done set the GOPROXY

export GOPROXY="https://username:api key@my.artifactory.server/artifactory/api/go/go"

After that try the go get.

Balaji L S
  • 151
  • 2