go version)?$ go version go1.12.9 darwin/amd64
I didn't try it
go env)?Output
$ GOARCH="amd64"
GOBIN=""
GOCACHE="{redacted}/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/{redacted}/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.9/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.9/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/{redacted}/{redacted}/{redacted}/go.mod"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/83/wlwj_kj92wvfscsx4vrm19090gkgk5/T/go-build718486207=/tmp/go-build -gno-record-gcc-switches -fno-common"
I'm trying to access a Go private remote package on my firm's Github inside a CircleCI's job. I've managed to get it in the test job, with:
git config --global url."https://{user}:${token}@github.com/".insteadOf "https://github.com/"
But somehow, this command doesn't work in the build job. I have this error at the Build app Docker image step, when "RUN go mod download" is launched :
fatal: could not read Username for 'https://github.com': terminal prompts disabled
I've tried :
git config --global url."https://{user}:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/": works locally, in test job on CI but not in build jobgit config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/"echo "machine github.com login xxxx password xxx">~/.netrcgit config --global url.ssh://[email protected]/.insteadOf https://github.com/Any idea ? Many thanks !
(Warning: I'm a junior dev, beginning to work with Go; sorry if it's dumb)
No errors.
fatal: could not read Username for 'https://github.com': terminal prompts disabled
If it's related to docker, try running:
RUN echo "[url \"[email protected]:\"]\n\tinsteadOf = https://github.com/" >> /root/.gitconfig with your user and token provided.
Have you tried export GIT_TERMINAL_PROMPT=1 before issuing your command?
Have you tried export GIT_TERMINAL_PROMPT=1 before issuing your command?
@helgix yes, and I have now this error :
fatal: could not read Username for 'https://github.com': No such device or address
This issue seems to be a question about how to use Go, rather than a feature request or defect report about the Go language and/or toolchain.
We have decided that our experiment to allow questions on the issue tracker has not had the outcome we desired, so I am closing this issue. I'm sorry that we can't answer your question here.
There are many other methods to get help if you're still looking for answers:
The golang-nuts mailing list.
Stack Overflow, with questions tagged go.
The Go Forum, a web-based forum hosted by GoBridge.
The Gophers Slack hosted by GopherAcademy; use the invite app for access.
The #general channel is a good starting point.
Go Community on Hashnode with questions and posts tagged with "go"
IRC channel #go-nuts on Freenode
Thanks
@arturasjurev yes, and I have this error now :
ssh -o ControlMaster=no: line 1: ssh: not found
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I'm guessing I have to add a .ssh during my build then ?
@bcmills thank you, I understand.
If someone has an idea, don't hesitate to go on :
Thanks again
@bcmills thank you, I understand.
If someone has an idea, don't hesitate to go on :
Thanks again
Hi @FradiFrad got 404 page not found
@adzimzf it looks like the stack overflow question has been removed. Unlike many projects on GitHub, the Go project does not use its bug tracker for general discussion or asking questions. We only use our bug tracker for tracking bugs and tracking proposals going through the Proposal Process.
Please see https://golang.org/wiki/Questions for good places to ask questions.