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: go tool needs to supply tls client cert when server requires mutual auth #39261

Closed
tredeske opened this issue May 26, 2020 · 2 comments
Closed
Labels
FrozenDueToAge GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@tredeske
Copy link

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

$ go version

go1.14.2 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env

On a disconnected network, so cannot get all of these values. But:

GOPROXY='direct'

What did you do?

With a go.mod file:

module main

go 1.14

require gopkg.in/yaml.v2 v2.2.2

replace gopkg.in/yaml.v2 => private-git-server/go-yaml/yaml v2.0.0

Then attempt to build: go build main.go

Results in this error:

unrecognized import path "private-git-server/go-yaml/yaml": reading https://private-git-server/go-yaml/yaml?go-get=1: 400 Bad Request

Using curl shows that a client tls cert is required by private-git-server, and not providing it results in the 400.

Attempted to mod .gitconfig to force use of ssh, but this http check is not governed by the git configuration.

There does not appear to be a way to supply a client tls cert to the go tool.

Using git, it is possible to clone the module to a local dir, then modify the go.mod to do a local replace instead:

replace gopkg.in/yaml.v2 => ./yaml

This works, but is not desirable.

What did you expect to see?

Expected to have module pulled from the server.

What did you see instead?

unrecognized import path "private-git-server/go-yaml/yaml": reading https://private-git-server/go-yaml/yaml?go-get=1: 400 Bad Request

@andybons
Copy link
Member

@bcmills @jayconrod @matloob

@andybons andybons changed the title go tool needs to supply tls client cert when server requires mutual auth cmd/go: go tool needs to supply tls client cert when server requires mutual auth May 27, 2020
@andybons andybons added GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels May 27, 2020
@andybons andybons added this to the Unplanned milestone May 27, 2020
@bcmills
Copy link
Contributor

bcmills commented Aug 31, 2020

Duplicate of #30119

@bcmills bcmills marked this as a duplicate of #30119 Aug 31, 2020
@bcmills bcmills closed this as completed Aug 31, 2020
@golang golang locked and limited conversation to collaborators Aug 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go 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