miku / esbulk

Bulk indexing command line tool for elasticsearch.
GNU General Public License v3.0
278 stars 41 forks source link

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

Open hahuang65 opened 8 months ago

hahuang65 commented 8 months ago

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/esbulk@v0.7.15

==> 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/esbulk@v0.7.15
==> amazon-ebs: go: downloading github.com/miku/esbulk v0.7.15
==> amazon-ebs: go: github.com/miku/esbulk/cmd/esbulk@v0.7.15: github.com/miku/esbulk@v0.7.15 requires
==> amazon-ebs:         github.com/containerd/containerd@v1.7.0 requires
==> amazon-ebs:         github.com/Microsoft/hcsshim@v0.10.0-rc.7 requires
==> amazon-ebs:         github.com/open-policy-agent/opa@v0.42.2 requires
==> amazon-ebs:         oras.land/oras-go@v1.2.0 requires
==> amazon-ebs:         github.com/distribution/distribution/v3@v3.0.0-20220526142353-ffbd94cbe269 requires
==> amazon-ebs:         github.com/mitchellh/osext@v0.0.0-20151018003038-5e2d6d41470f: 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.

miku commented 8 months ago

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 ...
hahuang65 commented 8 months ago

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