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 get
by 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!
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
After that try the
go get
.