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

Open
tredeske opened this issue May 26, 2020 · 1 comment
Open

Comments

@tredeske
Copy link

@tredeske tredeske commented May 26, 2020

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

@andybons andybons commented May 27, 2020

@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 this to the Unplanned milestone May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.