Go modules with using Github on init url causes error #35267
Labels
FrozenDueToAge
modules
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Using the following as an example: https://blog.golang.org/using-go-modules
But used my Github URL instead of example.com:
go mod init github.com/jbramden/hello
Created a sub directory for world
added world.go with the following
changed hello.go to call world using the import path as stated in the go mod init and called World().
then I run go test and I should see the test results.
What did you expect to see?
What did you see instead?
bash-3.2$ go test
hello.go:4:2: git ls-remote -q https://github.com/jbramsden/hello in /Users/jbramsden/go/pkg/mod/cache/vcs/c2625a56b67add752fe30dd618aa886e71e6f3a95817f75a91890900f68dacfc: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
What else did you try?
If I remove go.mod file and run
Then I change hello.go to have the correct path for import
"example.com/hello/world
And I rerun
go test
I get the expect results
I also tested this with other URLs other then github.com and it works correctly. E.G bitbucket.com
What do you think is happening?
For Github it is expecting the code to be checked in and trying to download it. However this is working differently from any other URL.
The text was updated successfully, but these errors were encountered: