go-remote不是下载模块,而是goget.html

I got 404 error when I go get through Artifactory remote repo.

$ go get -v github.com/pkg/errors
go get github.com/pkg/errors: unexpected status (http://myartifactory:8081/artifactory/api/go/go/github.com/pkg/errors/@v/list): 404 Not Found

What I have:

  • go v1.11
  • artifactory v6.5.9
  • GO111MODULE=on and GOPROXY=${ARTIFACTORY_URL}

What I found in the Artifactory remote repo is a goget.html showing a Github page. It seems Artifactory is unable to clone the remote repo from Github but just saved an irrelevant html page. May I ask what's possible reason cause this problem? Thanks in advance.

This is fixed in v6.7.

Artifactory 6.7 Release Note

Fixed an issue in which under certain circumstances, an Artifactory remote Go repository would cache a goget.html file instead of the corresponding Go module.