go: cmd/go: checksum mismatch for x8s.io/client-go@v8.0.0+incompatible

What version of Go are you using (go version)?

Go 1.11

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

darwin amd64

What did you do?

go build ./... reproduction is difficult because including the package k8s.io/client-go causes incompatible dependencies to be pulled in which is something I have to solve manually.

What did you expect to see?

A repeat of successful builds from the day before.

What did you see instead?

A checksum mismatch this morning after cloning the project to my personal laptop and attempting a build.

go: verifying k8s.io/client-go@v8.0.0+incompatible: checksum mismatch
        downloaded: h1:7Zl+OVXn0bobcsi4NEZGdoQDTE9ij1zPMfM21+yqQsM=
        go.sum:     h1:2pUaSg2x6iEHr8cia6zmWhoCXG1EDG9TCx9s//Aq7HY=

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 21
  • Comments: 40 (20 by maintainers)

Commits related to this issue

Most upvoted comments

Great to see this is fixed! Any idea when it will be released? Go 1.11.4 is still affected. I’ve just wasted half a day because GoLand on OS X is updating the sum file automatically with checksums that don’t work in Linux containers. Turning this off at least makes it possible to compile again, but without module support / code completion.

OS X (Go 1.11.4, Git 2.17.2) github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28 h1:SzHLOWB819X9aUXh2ct6krDIoIujoTsj5J1rDMjkRyo=

Linux (Go 1.11.4, Git 2.17.1) github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28 h1:mkl3tvPHIuPaWsLtmHTybJeoVEW7cbePK73Ir8VtruA=

This does not appear to be fixed in Go 1.11.2. I removed go.sum, generated a new one with go mod tidy using Go 1.11.2, and I still encountered a checksum error when building the project in a Docker container from image golang:1.11.2.

go: verifying k8s.io/client-go@v9.0.0+incompatible: checksum mismatch
	downloaded: h1:2kqW3X2xQ9SbFvWZjGEHBLlWc1LG9JIJNXWkuqwdZ3A=
	go.sum:     h1:NXWpDuPFeVB5lYP1fTqJUtwigjtmRXJNtndnN53ldGI=

@jasonkeene, running go clean -modcache seemed to do the trick. Thanks.

OK, fixed by 1bca6ce.

@runner-mei Did you try go clean -modcache?

1.11.1:

rm go.sum go build

works

Even using go clean -modcache with go 1.11.2 is a bad user experience for me. I get an error about checksums even when running the command to clear checksums (GO111MODULE=on go clean -modcache).

go: downloading k8s.io/client-go v9.0.0+incompatible
go: verifying k8s.io/client-go@v9.0.0+incompatible: checksum mismatch
	downloaded: h1:2kqW3X2xQ9SbFvWZjGEHBLlWc1LG9JIJNXWkuqwdZ3A=
	go.sum:     h1:NXWpDuPFeVB5lYP1fTqJUtwigjtmRXJNtndnN53ldGI=

To prevent this, I actually had to disable modules and run the same command (GO111MODULE=off go clean -modcache).

But even then when the clean command has completed, I still get checksum errors when I attempt to run GO111MODULE=on go mod vendor:

go: downloading k8s.io/client-go v9.0.0+incompatible
go: downloading k8s.io/apimachinery v0.0.0-20181108192626-90473842928c
go: finding google.golang.org/grpc/keepalive latest
go: verifying k8s.io/client-go@v9.0.0+incompatible: checksum mismatch
	downloaded: h1:2kqW3X2xQ9SbFvWZjGEHBLlWc1LG9JIJNXWkuqwdZ3A=
	go.sum:     h1:NXWpDuPFeVB5lYP1fTqJUtwigjtmRXJNtndnN53ldGI=

I am on MacOS Mojave, by the way.

@jayschwa Did you run go clean -modcache from your host machine? The fix that is in 1.11.2 only applies to creating archives of modules when they are downloaded. If you already had the zipfile created and is in your cache it will need to be removed.

Using 1.11.5 and still have this impact

OS: Darwin/Mojave

Edit: apparently it works after I do:

rm go.sum
go mod vendor

In my case, I found that I had misplaced go.mod and go.sum files in my home directory, which go get was finding automatically and doing very strange things with. I deleted those files and things worked great. Thanks!

@jharshman For sure compiling from source was just to test to make sure this was your issue.

As far as the bug fix release, pretty sure @bcmills is on it here: https://github.com/golang/go/issues/28094

I would still like you to try the above steps to make sure you are not running into another issue and that the bug fix will actually fix your problem.

@katiehockman I would say this particular issue shouldn’t be closed because this seems to be a symptom of a larger issue and needs to be addressed. As @bcmills mentioned, +incompatible versions should not cause checksum mismatches but in this case it has.

And @bcmills to answer your question, no this was the only build running. There were no other builds going on concurrently.