You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmd/go: get fails to provide sensible error message for private vcs repos #25982
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
go version go1.10.3 linux/amd64 vgo:2018-02-20.1
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/exploser/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/exploser/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build534162883=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.10.3 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.10.3
uname -sr: Linux 4.16.14-2-MANJARO
LSB Version: n/a
Distributor ID: ManjaroLinux
Description: Manjaro Linux
Release: 17.1.10
Codename: Hakoila
/usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.27.
gdb --version: GNU gdb (GDB) 8.1
changed the title [-]cmd/go: import resolution fails silently for private git repos[/-][+]cmd/go: get fails silently for private git repos[/+]on Jul 17, 2018
I was playing around with modules and ran into an error issue similar to the one in this ticket. myprivate/repo is a private repo. I have all of my ssh keys setup correctly and I can clone the repo myself.
Here is the error:
go: converting vendor/manifest: stat github.com/myprivate/repo@1234sha: git fetch -f --depth=1 origin 1234sha:refs/dummy in /Users/vito-c/code/go/src/mod/cache/vcs/456sha: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Should I open a new issue for this? I believe it was trying to authenticate over https not via ssh because in my vendor/manifest there is https://github.com/mypriavet/repo If there is any workaround you want me to try let me know.
Activity
[-]x/vgo: import resolution fails silently for private git repos[/-][+]cmd/go: import resolution fails silently for private git repos[/+][-]cmd/go: import resolution fails silently for private git repos[/-][+]cmd/go: get fails silently for private git repos[/+]vito-c commentedon Jul 19, 2018
I was playing around with modules and ran into an error issue similar to the one in this ticket.
myprivate/repois a private repo. I have all of my ssh keys setup correctly and I can clone the repo myself.Here is the error:
Should I open a new issue for this? I believe it was trying to authenticate over
httpsnot viasshbecause in myvendor/manifestthere ishttps://github.com/mypriavet/repoIf there is any workaround you want me to try let me know.wayneashleyberry commentedon Jul 24, 2018
This also failed for me while running
1.11beta2, not sure if it's related.Where github.com/org/repo is a private repo which can get
git clone'd just fine.wayneashleyberry commentedon Aug 4, 2018
Just tried initialising a project that uses dep with beta 3.
myitcv commentedon Aug 6, 2018
Just to confirm @wayneashleyberry you're expecting that to succeed because a
git clonefor, say,github.com/overhq/over-stories-apisucceeds?Are you using ssh-based authentication here or some other?
wayneashleyberry commentedon Aug 6, 2018
@myitcv hi 👋
absolutely correct
ssh auth
myitcv commentedon Aug 6, 2018
Hi indeed @wayneashleyberry!
Do you also have an
insteadOfconfig forgit? Something likeurl.git@github.com:.insteadof=https://github.com/?wayneashleyberry commentedon Aug 6, 2018
nope, what I pasted above is the only config I use for github
wayneashleyberry commentedon Aug 6, 2018
Just read https://golang.org/doc/faq#git_https and that fixes things for me! Thanks for pointing me in the right direction @myitcv
24 remaining items
matloob commentedon Mar 24, 2026
This was fixed by CL 297950