ThreeDotsLabs / nats-example

An example Go project for running local development environment, with hot code reloading.
MIT License
100 stars 25 forks source link

go-nats-streaming : This download does NOT match the one reported by the checksum server. #3

Closed SunA0 closed 3 years ago

SunA0 commented 3 years ago

Recently followed your bolg I like it so much

I read your blog and followed the steps

cd publisher
go get github.com/nats-io/go-nats-streaming 

The following problems have occurred:

sun@terminal publisher % go get github.com/nats-io/go-nats-streaming  

go: downloading github.com/nats-io/go-nats-streaming v0.4.4
go: downloading github.com/nats-io/nkeys v0.1.2
github.com/nats-io/go-nats-streaming imports
    github.com/nats-io/go-nats imports
    github.com/nats-io/nkeys: github.com/nats-io/nkeys@v0.1.2: verifying module: checksum mismatch
    downloaded: h1:6JJydNSjt/lqhfM+ngyaLk9Wa/d3UW/YyEqj8OrDV4w=
    sum.golang.org: h1:kWUa9fUdAOW426qaAD1V4+suF4On2eTr2n/FE/XSGpg=

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'.

I tried the following methods to solve it

go clean -modcache
rm go.sum
go mod tidy  

It's no use

So is there any way

thank you

m110 commented 3 years ago

Hey @SunA0! It seems this is because watermill-nats uses github.com/nats-io/nats-streaming-server, which is now deprecated.

I think the correct steps would be:

go get github.com/ThreeDotsLabs/watermill
go get github.com/ThreeDotsLabs/watermill-nats
go get github.com/nats-io/stan.go

stan is the new package and these should be enough to run the examples. I'll review it and update the post, but you can try it anyway. :)

SunA0 commented 3 years ago

I adopted the above suggestions and executed the following additional commands

go get github.com/nats-io/nkeys

Finally succeeded

thanks :)