Skip to content

Go modules won't working. this is weired. #36423

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

Closed
Kyocfe opened this issue Jan 7, 2020 · 10 comments
Closed

Go modules won't working. this is weired. #36423

Kyocfe opened this issue Jan 7, 2020 · 10 comments

Comments

@Kyocfe
Copy link

Kyocfe commented Jan 7, 2020

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

$ go version
go version go1.12.14 windows/amd64 and linux xenial i think it dosen't matter..

Does this issue reproduce with the latest release?

i didn't try yet

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

go env Output
$ go env

What did you do?

$ go mod init
$ go test -v
go: finding github.com/stretchr/testify/assert latest
go: finding go.mongodb.org/mongo-driver/mongo latest
go: finding go.mongodb.org/mongo-driver/bson/primitive latest
go: finding go.mongodb.org/mongo-driver/mongo/options latest
go: finding go.mongodb.org/mongo-driver/bson latest
go: finding github.com/xdg/scram latest
go: finding github.com/aws/aws-sdk-go/aws latest
go: finding github.com/aws/aws-sdk-go/aws/awserr latest
go: finding github.com/aws/aws-sdk-go/aws/session latest
go: finding github.com/aws/aws-sdk-go/aws/credentials latest
go: finding github.com/aws/aws-sdk-go/service/ses latest
go: finding github.com/aws/aws-sdk-go/service/s3 latest
go: finding github.com/aws/aws-sdk-go/service/s3/s3manager latest
go: finding github.com/google/go-cmp/cmp latest
go: finding github.com/google/go-cmp/cmp/cmpopts latest
go: finding github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus latest
go: finding github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub latest
go: finding github.com/Azure/go-autorest/autorest/azure latest
go: finding github.com/aws/aws-sdk-go v1.27.1
go: finding github.com/aws/aws-sdk-go/service latest
go: finding golang.org/x/sync/semaphore latest
go: finding golang.org/x/sync latest
go: downloading github.com/aws/aws-sdk-go v1.27.1
go: finding github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01 latest
go: finding github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01 latest
go: finding github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt latest
go: finding github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt latest
go: finding github.com/Azure/azure-sdk-for-go/services/servicebus latest
go: finding github.com/Azure/azure-sdk-for-go/services/eventhub latest
go: finding github.com/Azure/azure-sdk-for-go/services latest
go: finding github.com/Azure/azure-sdk-for-go v38.0.0+incompatible
go: downloading github.com/Azure/azure-sdk-for-go v38.0.0+incompatible
go: extracting github.com/aws/aws-sdk-go v1.27.1
go: extracting github.com/Azure/azure-sdk-for-go v38.0.0+incompatible
go: updates to go.mod needed, but contents have changed

What did you expect to see?

go.sum file is little weird..
this is fine in the local environment.
but when I try to use it in travis or docker compose the build keeps failing
because I can't find a particular repository.

Result

get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
go: finding gopkg.in/yaml.v2 v2.2.2
go: github.com/belogik/[email protected]: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /home/travis/gopath/pkg/mod/cache/vcs/5b0453a6aac74c86b31f0a771f02325d031eaf6ec0f0503f1cc20852de3abb0a: exit status 128:
	remote: Repository not found.
	fatal: repository 'https://{Username}:{GITHUB_TOKEN}@github.com/belogik/goes/' not found

the belogik/goes repository not found error
i didn't use this repository
but always bring me the repository by the go modules

here is my go.mod file

module github.com/{MYREPO}

go 1.12

require (
	github.com/Azure/azure-sdk-for-go v38.0.0+incompatible // indirect
	github.com/Azure/go-autorest/autorest v0.9.3 // indirect
	github.com/Azure/go-autorest/autorest/adal v0.8.1 // indirect
	github.com/Azure/go-autorest/autorest/to v0.3.0 // indirect
	github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
	github.com/DataDog/zstd v1.4.4 // indirect
	github.com/appleboy/gin-jwt/v2 v2.6.2
	github.com/aws/aws-sdk-go v1.27.1 // indirect
	github.com/fortytw2/leaktest v1.3.0 // indirect
	github.com/gin-contrib/cors v1.3.0
	github.com/gin-gonic/gin v1.5.0
	github.com/go-stack/stack v1.8.0 // indirect
	github.com/google/go-cmp v0.3.1 // indirect
	github.com/gorilla/websocket v1.4.1
	github.com/stretchr/testify v1.4.0
	github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect
	github.com/xdg/stringprep v1.0.0 // indirect
	go.mongodb.org/mongo-driver v1.2.0
	golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
	gopkg.in/go-playground/validator.v9 v9.31.0
	pack.ag/amqp v0.12.5
)

What did you see instead?

@aofei
Copy link
Contributor

aofei commented Jan 7, 2020

Is github.com/belogik/goes a private repo? If so, please see https://golang.org/doc/faq#git_https for additional information.

Also, keep in mind that the go.mod file doesn't necessarily contain all the module versions that your project depends on, usually it only contains the direct dependencies. Take a look at your go.sum file, maybe it's there. Or use go mod why github.com/belogik/goes to check the reason.

@Kyocfe
Copy link
Author

Kyocfe commented Jan 7, 2020

Thank you for your answering.
github.com/belogik/goes is not my repository it's just auto created by the go modules

and i get to type go mod why github.com/belogik/goes
below is the result

# github.com/belogik/goes
(main module does not need package github.com/belogik/goes)

main module does not need thie package but i can't remove that link in the go.mod file
it's just auto create

@aofei
Copy link
Contributor

aofei commented Jan 7, 2020

Try this: go mod graph | grep 'github.com/belogik/goes'

@Kyocfe
Copy link
Author

Kyocfe commented Jan 7, 2020

$ go mod graph | grep 'github.com/belogik/goes'
github.com/astaxie/[email protected] github.com/belogik/[email protected]
$ go mod why github.com/astaxie/beego
# github.com/astaxie/beego
(main module does not need package github.com/astaxie/beego)
$ go mod graph | grep 'github.com/astaxie/beego'
github.com/appleboy/gofight/[email protected] github.com/astaxie/[email protected]
github.com/astaxie/[email protected] github.com/Knetic/[email protected]+incompatible
github.com/astaxie/[email protected] github.com/beego/[email protected]
github.com/astaxie/[email protected] github.com/beego/[email protected]
github.com/astaxie/[email protected] github.com/belogik/[email protected]
github.com/astaxie/[email protected] github.com/bradfitz/[email protected]
github.com/astaxie/[email protected] github.com/casbin/[email protected]
github.com/astaxie/[email protected] github.com/cloudflare/[email protected]
github.com/astaxie/[email protected] github.com/couchbase/[email protected]
github.com/astaxie/[email protected] github.com/couchbase/[email protected]
github.com/astaxie/[email protected] github.com/couchbase/[email protected]
github.com/astaxie/[email protected] github.com/cupcake/[email protected]
github.com/astaxie/[email protected] github.com/edsrzf/[email protected]
github.com/astaxie/[email protected] github.com/elazarl/[email protected]
github.com/astaxie/[email protected] github.com/go-redis/[email protected]+incompatible
github.com/astaxie/[email protected] github.com/go-sql-driver/[email protected]
github.com/astaxie/[email protected] github.com/gogo/[email protected]
github.com/astaxie/[email protected] github.com/golang/[email protected]
github.com/astaxie/[email protected] github.com/gomodule/[email protected]+incompatible
github.com/astaxie/[email protected] github.com/lib/[email protected]
github.com/astaxie/[email protected] github.com/mattn/[email protected]
github.com/astaxie/[email protected] github.com/pelletier/[email protected]
github.com/astaxie/[email protected] github.com/pkg/[email protected]
github.com/astaxie/[email protected] github.com/siddontang/[email protected]
github.com/astaxie/[email protected] github.com/siddontang/[email protected]
github.com/astaxie/[email protected] github.com/siddontang/[email protected]
github.com/astaxie/[email protected] github.com/ssdb/[email protected]
github.com/astaxie/[email protected] github.com/syndtr/[email protected]
github.com/astaxie/[email protected] github.com/wendal/[email protected]
github.com/astaxie/[email protected] golang.org/x/[email protected]
github.com/astaxie/[email protected] golang.org/x/[email protected]
github.com/astaxie/[email protected] gopkg.in/[email protected]

@aofei
Copy link
Contributor

aofei commented Jan 7, 2020

Keep digging until you find the one you depend on directly: go mod graph | 'github.com/appleboy/gofight/v2'

@Kyocfe
Copy link
Author

Kyocfe commented Jan 7, 2020

i found it github.com/appleboy/gin-jwt/v2
i was recongnized the go.sum file changed because of the import github.com/appleboy/gin-jwt/v2 changed without v2.
but i should use this repository(v2)
because they were recommended this way link

@aofei
Copy link
Contributor

aofei commented Jan 7, 2020

See this: appleboy/gin-jwt#228

@Kyocfe
Copy link
Author

Kyocfe commented Jan 7, 2020

thank you @aofei i love you

@appleboy
Copy link

appleboy commented Jan 7, 2020

@Kyocfe @aofei Already fixed appleboy/gin-jwt#229

@Kyocfe
Copy link
Author

Kyocfe commented Jan 8, 2020

thank you for your quick feedback :) i'll follow it

@golang golang locked and limited conversation to collaborators Jan 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants