Skip to content
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: mod download uses global gitconfig, should check project's gitconfig first #31802

Closed
genert opened this issue May 2, 2019 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@genert
Copy link

genert commented May 2, 2019

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

go version go1.12.4 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/genertorg/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/genertorg/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.4/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/genertorg/masga/gobase/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/tb/3yd9xyqj5cn53csl1k17tmgr0000gn/T/go-build189348569=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

When using "git config url."git@bitbucket.org:".insteadOf https://bitbucket.org/" within project folder, it would be expected that when getting private package within bitbucket SVN, the project's git configuration should be used instead of global git configuration.

Currently this does not work as GLOBAL git configuration file is used.

What did you expect to see?

It would be great if the existence of project's gitconfig is checked first and used in that case. Otherwise fall back to global configuration.

What did you see instead?

Opposite behavior.

@bradfitz bradfitz changed the title Go mod download uses global gitconfig, should check project's gitconfig first cmd/go: mod download uses global gitconfig, should check project's gitconfig first May 2, 2019
@bradfitz
Copy link
Contributor

bradfitz commented May 2, 2019

/cc @bcmills

@bradfitz bradfitz added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 2, 2019
@bradfitz bradfitz added this to the Go1.13 milestone May 2, 2019
@bcmills
Copy link
Contributor

bcmills commented May 6, 2019

Duplicate of #31256

@bcmills bcmills marked this as a duplicate of #31256 May 6, 2019
@bcmills bcmills closed this as completed May 6, 2019
@golang golang locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants