esbulk icon indicating copy to clipboard operation
esbulk copied to clipboard

`go install` does not work because of mitchellh/osext

Open hahuang65 opened this issue 1 year ago • 2 comments

I'm trying to build an AMI that includes esbulk. However, it no longer can grab mitchellh/osext:

GOPATH=/tmp GOCACHE=/tmp GOBIN=/usr/local/sbin HOME=/root go install github.com/miku/esbulk/cmd/[email protected]


==> amazon-ebs: + GOPATH=/tmp
==> amazon-ebs: + GOCACHE=/tmp
==> amazon-ebs: + GOBIN=/usr/local/sbin
==> amazon-ebs: + HOME=/root
==> amazon-ebs: + go install github.com/miku/esbulk/cmd/[email protected]
==> amazon-ebs: go: downloading github.com/miku/esbulk v0.7.15
==> amazon-ebs: go: github.com/miku/esbulk/cmd/[email protected]: github.com/miku/[email protected] requires
==> amazon-ebs:         github.com/containerd/[email protected] requires
==> amazon-ebs:         github.com/Microsoft/[email protected] requires
==> amazon-ebs:         github.com/open-policy-agent/[email protected] requires
==> amazon-ebs:         oras.land/[email protected] requires
==> amazon-ebs:         github.com/distribution/distribution/[email protected] requires
==> amazon-ebs:         github.com/mitchellh/[email protected]: invalid version: git ls-remote -q origin in /tmp/pkg/mod/cache/vcs/94ed57c5b21c953d93b47487113db43a5c9b69fd990329ec70dc77348c4dd443: exit status 128:
==> amazon-ebs:         fatal: could not read Username for 'https://github.com': terminal prompts disabled
==> amazon-ebs: Confirm the import path was entered correctly.
==> amazon-ebs: If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.

As far as I can tell, that repository has been made private, or deleted.

hahuang65 avatar Nov 28 '23 21:11 hahuang65

Similar problems: https://github.com/confluentinc/confluent-kafka-go/issues/1102

In theory, the module proxy should take care of that. Maybe you can try to explicitly set the GOPROXY env variable, like so:

GOPROXY=proxy.golang.org GOPATH=/tmp GOCACHE=/tmp ...

miku avatar Nov 29 '23 10:11 miku

@miku thanks, that worked out for now. I would assume that the project should update the dependencies at some point?

hahuang65 avatar Nov 29 '23 16:11 hahuang65