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

Checksum mismatch for go 1.13 #49

Closed
im-kulikov opened this issue Sep 10, 2019 · 12 comments
Closed

Checksum mismatch for go 1.13 #49

im-kulikov opened this issue Sep 10, 2019 · 12 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@im-kulikov
Copy link

im-kulikov commented Sep 10, 2019

Expect (go version go1.12.9 darwin/amd64):

→ go mod tidy -v
go: downloading github.com/panjf2000/ants v1.2.0
go: extracting github.com/panjf2000/ants v1.2.0

Actual (go version go1.13 darwin/amd64)

→ go mod tidy -v
verifying github.com/panjf2000/[email protected]: checksum mismatch
        downloaded: h1:Ufw4aDz9RqH1RVblx2W9L9Uv5vSX5apbX5+peR7LQ5k=
        sum.golang.org: h1:pMQ1/XpSgnWx3ro4y1xr/uA3jXUsTuAaU3Dm0JjwggE=

SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.

UPD: mb this issue will be useful - golang/go#33665


UPD: how resolve issue step by step (macOS):

  • sudo go clean -modcache
  • git checkout go.sum
  • go mod tidy -v

UPD for Linux:

  • cd /another/path
  • go clean -modcache
  • cd /project/path
  • go mod tidy
@im-kulikov im-kulikov added the bug Something isn't working label Sep 10, 2019
@panjf2000 panjf2000 added good first issue Good for newcomers help wanted Extra attention is needed and removed bug Something isn't working labels Sep 11, 2019
@panjf2000
Copy link
Owner

panjf2000 commented Sep 12, 2019

@im-kulikov
Thanks for reporting this issue and providing the solution, it seems that go clean -modcache is the only way to resolve this issue for now, right?
But still, I don't know why this is happening, do you? by any chance?

@im-kulikov
Copy link
Author

@im-kulikov
Thanks for reporting this issue and providing the solution, it seems that go clean -modcache is the only way to resolve this issue, right?
But still, I don't know why this is happening, do you? by any chance?

@panjf2000 yeah, this solution works for me (macOS), for Linux:

  • cd /another/path
  • go clean -modcache
  • cd /project/path
  • go mod tidy

But still, I don't know why this is happening, do you? by any chance?

something similar has already happened with go1.10 and go1.11

I attached issue from golang repo, mb someone can help with additional info

@panjf2000
Copy link
Owner

Got it, thanks~

@panjf2000
Copy link
Owner

There is a fundamental solution to this kind of issue:

# Remove go.sum
rm go.sum

# Then re-generate go.sum
go mod tidy

@panjf2000 panjf2000 pinned this issue Oct 22, 2019
@im-kulikov
Copy link
Author

@panjf2000 but on other computers, you will receive this bug again..

@panjf2000
Copy link
Owner

@im-kulikov
What did you mean? Removing go.sum still didn't work?

@im-kulikov
Copy link
Author

No, because problem is with go-modules..
Solution:

  • cleanup $GOPATH/pkg/mod
  • cleanup $GOPATH/pkg/sumdb
  • go mod download
  • replace hash in go.sum

@r6c
Copy link

r6c commented Oct 27, 2019

still not work on Windows go 1.13.3

@r6c
Copy link

r6c commented Oct 27, 2019

go: downloading github.com/panjf2000/ants v1.2.0
go: downloading github.com/panjf2000/ants/v2 v2.2.2
verifying github.com/panjf2000/[email protected]: checksum mismatch
        downloaded: h1:Ufw4aDz9RqH1RVblx2W9L9Uv5vSX5apbX5+peR7LQ5k=
        sum.golang.org: h1:pMQ1/XpSgnWx3ro4y1xr/uA3jXUsTuAaU3Dm0JjwggE=

SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.

@panjf2000
Copy link
Owner

It seems that you are trying to download both v1 and v2 of ants? Why did you do that?
And removing go.sum didn't work?

@patrick-othmer
Copy link

Important thing: Close your IDE! I had that problem with GoLand. Close IDE and repeat the steps:
cd /another/path
go clean -modcache
cd /project/path
go mod tidy

@panjf2000
Copy link
Owner

Fixed in #168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants