I am trying to build metricbeat from scratch but am getting hung up on 'https://github.com/mitchellh/osext/' apparently not existing anymore.
I am building with:
$ git clone https://github.com/elastic/beats.git
$ cd beats/metricbeat
$ git checkout v8.12.0
$ make mage
$ mage crossBuild
The last step fails with:
go: github.com/docker/go-plugins-helpers@v0.0.0-20181025120712-1e6269c305b8 requires
github.com/Microsoft/hcsshim@v0.8.7 requires
github.com/containerd/containerd@v1.5.7 requires
github.com/containerd/aufs@v1.0.0 requires
github.com/containerd/containerd@v1.5.0-beta.3 requires
github.com/Microsoft/hcsshim/test@v0.0.0-20210227013316-43a75bb4edd3 requires
github.com/containerd/containerd@v1.5.0-beta.1 requires
github.com/Microsoft/hcsshim/test@v0.0.0-20201218223536-d3e5debf77da requires
github.com/docker/distribution@v0.0.0-20190905152932-14b96e55d84c requires
github.com/mitchellh/osext@v0.0.0-20151018003038-5e2d6d41470f: invalid version: git ls-remote -q origin in /home/dominik/go/pkg/mod/cache/vcs/94ed57c5b21c953d93b47487113db43a5c9b69fd990329ec70dc77348c4dd443: exit status 128:
remote: Repository not found.
fatal: repository 'https://github.com/mitchellh/osext/' not found
Error: running "go mod download" failed with exit code 1
I was able to work around this problem by setting GOPROXY=https://proxy.golang.org/cached-only
, but this doesn't seem like a very short-lived solution.
I wanted to create an Issue on Beats GitHub repo but the issue template pointed me here first.
What should I do to make sure, the builds don't fail in the future?