-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/go: get fails to provide sensible error message for private vcs repos #25982
Comments
I was playing around with modules and ran into an error issue similar to the one in this ticket. Here is the error:
Should I open a new issue for this? I believe it was trying to authenticate over |
This also failed for me while running
Where github.com/org/repo is a private repo which can get |
Just tried initialising a project that uses dep with beta 3. $ go1.11beta3 mod init
go: creating new go.mod: module github.com/overhq/over-stories-api
go: copying requirements from Gopkg.lock
go: converting Gopkg.lock: stat github.com/overhq/[email protected]: unknown revision v7.1.2 $ go1.11beta3 build main.go
go: finding github.com/gobuffalo/makr v1.1.0
go: finding github.com/joho/godotenv v1.2.0
go: finding github.com/gobuffalo/pop v0.0.0-20180726201638-c0faa0f7edf8
go: finding github.com/googleapis/gax-go v2.0.0+incompatible
go: finding github.com/sergi/go-diff v1.0.0
go: finding github.com/gobuffalo/uuid v2.0.0+incompatible
go: finding github.com/gobuffalo/packr v1.12.0
go: finding github.com/go-chi/chi v3.3.2+incompatible
go: finding github.com/russross/blackfriday v0.0.0-20180428102519-11635eb403ff
go: finding github.com/gobuffalo/fizz v1.0.2
go: finding github.com/spf13/cobra v0.0.3
go: finding github.com/markbates/going v1.0.0
go: finding github.com/francoispqt/gojay v0.0.0-20180723134641-7dc0f34a209c
go: finding github.com/golang/protobuf v1.1.0
go: finding github.com/shurcooL/github_flavored_markdown v0.0.0-20180602233135-8913699a52e3
go: finding github.com/gobuffalo/packr v1.11.1
go: finding github.com/gobuffalo/validate v1.0.0
go: finding github.com/markbates/inflect v1.0.0
go: finding github.com/mitchellh/go-homedir v0.0.0-20180523094522-3864e76763d9
go: finding github.com/gobuffalo/tags v0.0.0-20180702174034-96c7cdfcadcb
go: finding github.com/go-gorp/gorp v0.0.0-20180410155428-6032c66e0f5f
go: finding github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d
go: finding github.com/spf13/pflag v1.0.1
go: finding github.com/go-redis/redis v6.13.2+incompatible
go: finding github.com/microcosm-cc/bluemonday v1.0.0
go: finding github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9
go: finding github.com/mattn/go-isatty v0.0.3
go: finding golang.org/x/sys v0.0.0-20180616030259-6c888cc515d3
go: finding google.golang.org/api v0.0.0-20180726000515-082d5fa4f1f0
go: finding github.com/go-sql-driver/mysql v1.4.0
go: finding go.uber.org/zap v1.9.0
go: finding github.com/markbates/grift v1.0.0
go: finding google.golang.org/genproto v0.0.0-20180726180014-2a72893556e4
go: finding github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516
go: finding gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405
go: finding gopkg.in/square/go-jose.v2 v2.1.7
go: finding golang.org/x/text v0.3.0
go: finding google.golang.org/appengine v1.1.0
go: finding golang.org/x/sys v0.0.0-20180715085529-ac767d655b30
go: finding github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b
go: finding github.com/pkg/errors v0.8.0
go: finding github.com/mattn/go-sqlite3 v1.9.0
go: finding github.com/mattn/go-colorable v0.0.9
go: finding github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95
go: finding github.com/gobuffalo/validate v2.0.0+incompatible
go: finding cloud.google.com/go v0.23.0
go: finding golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc
go: finding go.uber.org/multierr v1.1.0
go: finding github.com/inconshreveable/mousetrap v1.0.0
go: finding github.com/markbates/validate v1.0.0
go: finding dmitri.shuralyov.com/text/kebabcase v0.0.0-20180217051803-40e40b42552a
go: finding github.com/gobuffalo/envy v1.6.3
go: finding github.com/satori/go.uuid v1.2.0
go: finding github.com/gobuffalo/plush v0.0.0-20180619220412-2ec029f415ed
go: finding go.uber.org/atomic v1.3.2
go: finding golang.org/x/sys v0.0.0-20180724212812-e072cadbbdc8
go: finding github.com/mattn/anko v0.0.5
go: finding github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e
go: finding github.com/kelseyhightower/envconfig v1.3.0
go: finding github.com/fatih/color v1.7.0
go: finding github.com/stretchr/testify v1.2.2
go: finding golang.org/x/net v0.0.0-20180611182652-db08ff08e862
go: finding google.golang.org/grpc v1.13.0
go: finding github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7
go: finding github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8
go: finding golang.org/x/net v0.0.0-20180712202826-d0887baf81f4
go: finding github.com/gobuffalo/uuid v0.0.0-20180207211247-3a9fb6c5c481
go: finding golang.org/x/net v0.0.0-20180724234803-3673e40ba225
go: finding github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e
go: finding github.com/fatih/structs v1.0.0
go: finding github.com/shurcooL/graphql v0.0.0-20180514000029-62c9ce094e75
go: finding github.com/stretchr/objx v0.1.1
go: finding golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
go: finding github.com/newrelic/go-agent v2.0.0+incompatible
go: finding github.com/gobuffalo/pop v0.0.0-20180710054625-9936c00d4230
go: finding github.com/lib/pq v0.0.0-20180523175426-90697d60dd84
go: finding gopkg.in/yaml.v2 v2.2.1
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
go: finding github.com/gobuffalo/plush v0.0.0-20180724100351-726a3d7f08d2
go: finding golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb
go: finding github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0
go: finding github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041
go: finding github.com/inconshreveable/mousetrap v0.0.0-20141017200713-76626ae9c91c
go: finding go.opencensus.io v0.14.0
go: finding github.com/microcosm-cc/bluemonday v0.0.0-20180327211928-995366fdf961
go: finding github.com/fatih/structs v0.0.0-20170103081050-a720dfa8df58
go: finding github.com/gobuffalo/validate v0.0.0-20180210182920-42d8db6e06e6
go: finding github.com/gobuffalo/tags v0.0.0-20180320140155-82cd7696c84a
go: downloading github.com/spf13/cobra v0.0.3
go: downloading github.com/kelseyhightower/envconfig v1.3.0
go: downloading github.com/joho/godotenv v1.2.0
go: downloading github.com/go-redis/redis v6.13.2+incompatible
go: downloading github.com/pkg/errors v0.8.0
go: downloading github.com/gobuffalo/pop v0.0.0-20180726201638-c0faa0f7edf8
go: downloading github.com/francoispqt/gojay v0.0.0-20180723134641-7dc0f34a209c
go: downloading github.com/satori/go.uuid v1.2.0
go: downloading google.golang.org/api v0.0.0-20180726000515-082d5fa4f1f0
go: downloading cloud.google.com/go v0.23.0
go: downloading github.com/go-chi/chi v3.3.2+incompatible
go: downloading github.com/gobuffalo/uuid v2.0.0+incompatible
go: downloading github.com/markbates/inflect v1.0.0
go: downloading github.com/gobuffalo/fizz v1.0.2
go: downloading github.com/spf13/pflag v1.0.1
go: downloading github.com/fatih/color v1.7.0
go: downloading github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7
go: downloading github.com/lib/pq v0.0.0-20180523175426-90697d60dd84
go: downloading github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0
go: downloading github.com/markbates/going v1.0.0
go: downloading github.com/go-sql-driver/mysql v1.4.0
go: downloading github.com/gobuffalo/packr v1.12.0
go: downloading github.com/gobuffalo/makr v1.1.0
go: downloading github.com/mattn/go-colorable v0.0.9
go: downloading github.com/mattn/go-isatty v0.0.3
go: downloading github.com/gobuffalo/envy v1.6.3
go: downloading github.com/gobuffalo/plush v0.0.0-20180724100351-726a3d7f08d2
go: downloading github.com/go-gorp/gorp v0.0.0-20180410155428-6032c66e0f5f
go: downloading github.com/gobuffalo/validate v2.0.0+incompatible
go: downloading github.com/gobuffalo/tags v0.0.0-20180702174034-96c7cdfcadcb
go: downloading gopkg.in/yaml.v2 v2.2.1
go: downloading github.com/shurcooL/github_flavored_markdown v0.0.0-20180602233135-8913699a52e3
go: downloading github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8
go: downloading golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
go: downloading github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e
go: downloading github.com/microcosm-cc/bluemonday v1.0.0
go: downloading golang.org/x/net v0.0.0-20180724234803-3673e40ba225
go: downloading github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95
go: downloading github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d
go: downloading github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516
go: downloading github.com/russross/blackfriday v0.0.0-20180428102519-11635eb403ff
go: downloading github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9
go: downloading github.com/fatih/structs v1.0.0
go: downloading github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b
go: downloading github.com/sergi/go-diff v1.0.0
go: downloading github.com/googleapis/gax-go v2.0.0+incompatible
go: downloading go.opencensus.io v0.14.0
go: downloading google.golang.org/grpc v1.13.0
go: downloading google.golang.org/genproto v0.0.0-20180726180014-2a72893556e4
go: downloading github.com/golang/protobuf v1.1.0
go: downloading golang.org/x/text v0.3.0
go: downloading golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc
go: import "github.com/overhq/over-stories-api/cmd" ->
import "github.com/overhq/over-stories-api/cmd/app" ->
import "github.com/overhq/go-lib/pkg/log": cannot find module providing package github.com/overhq/go-lib/pkg/log
go: import "github.com/overhq/over-stories-api/cmd" ->
import "github.com/overhq/over-stories-api/cmd/app" ->
import "github.com/overhq/over-stories-api/pkg/app" ->
import "github.com/overhq/go-lib/pkg/middleware": cannot find module providing package github.com/overhq/go-lib/pkg/middleware
go: import "github.com/overhq/over-stories-api/cmd" ->
import "github.com/overhq/over-stories-api/cmd/app" ->
import "github.com/overhq/over-stories-api/pkg/app" ->
import "github.com/overhq/go-lib/pkg/servingurl": cannot find module providing package github.com/overhq/go-lib/pkg/servingurl
go: import "github.com/overhq/over-stories-api/cmd" ->
import "github.com/overhq/over-stories-api/cmd/app" ->
import "github.com/overhq/over-stories-api/pkg/app" ->
import "github.com/overhq/over-stories-api/pkg/handler" ->
import "github.com/overhq/go-lib/pkg/datetime": cannot find module providing package github.com/overhq/go-lib/pkg/datetime
go: import "github.com/overhq/over-stories-api/cmd" ->
import "github.com/overhq/over-stories-api/cmd/app" ->
import "github.com/overhq/over-stories-api/pkg/app" ->
import "github.com/overhq/over-stories-api/pkg/handler" ->
import "github.com/overhq/go-lib/pkg/errors": cannot find module providing package github.com/overhq/go-lib/pkg/errors
go: import "github.com/overhq/over-stories-api/cmd" ->
import "github.com/overhq/over-stories-api/cmd/app" ->
import "github.com/overhq/over-stories-api/pkg/app" ->
import "github.com/overhq/over-stories-api/pkg/cache" ->
import "github.com/overhq/over-stories-api/pkg/model" ->
import "github.com/overhq/go-lib/pkg/strconv": cannot find module providing package github.com/overhq/go-lib/pkg/strconv |
Just to confirm @wayneashleyberry you're expecting that to succeed because a Are you using ssh-based authentication here or some other? |
@myitcv hi 👋
absolutely correct
ssh auth cat ~/.ssh/config
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa |
Hi indeed @wayneashleyberry! Do you also have an |
nope, what I pasted above is the only config I use for github |
Just read https://golang.org/doc/faq#git_https and that fixes things for me! Thanks for pointing me in the right direction @myitcv |
👍 @wayneashleyberry - we could/should also add to that FAQ section details of how to use keychains (on any platform). |
So just to summarise what I think the action is here, we need any of the
So, taking the example of
We should instead see something like:
|
@bradfitz tells me that the "silent exit 1" fix fixed private repos that worked with "old go get". We can address even better support in Go 1.12. |
In non-module mode I see:
In module mode I see:
It's possible that we should recognize this failure (maybe 'terminal prompts disabled') and print a pointer to https://golang.org/doc/faq#git_https. |
This was a release blocker for Go 1.11 when it was a silent exit, and we fixed that. The extra doc pointer does not block Go 1.12 |
Change https://golang.org/cl/150777 mentions this issue: |
Updates #25982 Change-Id: I5a284e3844e944f9bfae31fa65b242060d4139c7 Reviewed-on: https://go-review.googlesource.com/c/150777 Run-TryBot: Julie Qiu <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]>
Commenting here since I just opened a duplicate. Could the sorts of issues we see in this ticket be due in part to how the current code is not handling the go/src/cmd/go/internal/modfetch/codehost/git.go Lines 298 to 336 in f1980ef
It looks like go/src/cmd/go/internal/modfetch/codehost/git.go Lines 179 to 198 in f1980ef
So ISTM that we should check if it was set after every call to |
Change https://golang.org/cl/284974 mentions this issue: |
What did you do?
I have a project that imports a private git repository. When setting it up with
vgo get
or similar commands, the resolving process will stop abruptly, not writing anything to the disk.The command succeeds if git credentials are properly set up (*_ASKPASS, global config or the repo is already cloned with the right config, etc.).
What did you expect to see?
An error message, or some indication of what went wrong
What did you see instead?
No error message, just an exit code 1.
System details
The text was updated successfully, but these errors were encountered: