Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot download go modules without go proxy #166

Closed
amisevsk opened this issue Sep 30, 2020 · 1 comment
Closed

Cannot download go modules without go proxy #166

amisevsk opened this issue Sep 30, 2020 · 1 comment
Assignees

Comments

@amisevsk
Copy link
Collaborator

Describe the problem

It's not possible to download go modules without using proxy.golang.org due to a couple of issues:

  • Running go mod download in the current master gives the error
    go: github.com/eclipse/che-plugin-broker@v3.1.1-0.20200207223144-b20597f15e4c+incompatible: invalid version: unknown revision b20597f15e4c
    
  • replacing v3.1.1-0.20200207223144-b20597f15e4c+incompatible with v3.1.1 in the go.mod file and running again updates the dependency to
    require github.com/eclipse/che-plugin-broker v3.1.1+incompatible
    
    and outputs the error
    go: github.com/openshift/api@v3.9.1-0.20190424152011-77b8897ec79a+incompatible: invalid pseudo-version: preceding tag (v3.9.0) not found
    
    which is related to Fix dependency on github.com/openshift/api operator-framework/operator-lifecycle-manager#1241, though it appears that this should not apply to this project since we're using operator-sdk 0.17

Additional details

The default go package in Fedora 31 and 32 uses GOPROXY=direct, which causes the issue above; this will likely impact rhel-based distros as well.

Workaround

Set GOPROXY=https://proxy.golang.org,direct before downloading modules or download and use a separate binary -- e.g.

pushd $(mktemp -d)
go get golang.org/dl/go${VERSION}
go${VERSION} download
alias go=go${VERSION}
popd

Once modules have been successfully cached, the error above is avoided even without using proxy.golang.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant