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

proposal: cmd/go: git repo client TLS certificate authentication support #53197

pboguslawski opened this issue Jun 2, 2022 · 2 comments


Copy link


myhost:~$ cat ~/.gitconfig
    name = Me
    email =
    sslCAPath = /etc/ssl/certs
    sslVerify = true
[http "https://my.repo"]
    sslCert = /home/me/tls/my.crt
    sslKey = /home/me/tls/my.key

git allows one to authenticate to repo using https and client TLS certificates and

myhost:~$ git clone https://my.repo/me/my-project fine.

But go mod tidy is unable to authenticate when fetching additional dependencies from same git service:

myhost:~$ go version
go version go1.18.1 linux/amd64
myhost:~$ export GO111MODULE=on
myhost:~$ export GOPRIVATE='my.repo'
myhost:~$ cd my-project
myhost:~/my-project$ go mod tidy
my.repo/me/my-project imports
	my.repo/me/my-lib/my-package: cannot find module providing package my.repo/me/my-lib/my-package: unrecognized import path "my.repo/me/my-lib/my-package": https fetch: Get "https://my.repo/me/my-lib/my-package?go-get=1": remote error: tls: certificate required

Please consider adding support in go cmd for connecting to private git repos using client TLS certificates.

Similar issue: #26232

Copy link

CC @bcmills @matloob

@ianlancetaylor ianlancetaylor added this to Incoming in Proposals (old) Jun 8, 2022
Copy link

Duplicate of #30119

@seankhliao seankhliao marked this as a duplicate of #30119 Jun 15, 2022
@seankhliao seankhliao removed this from Incoming in Proposals (old) Jul 3, 2022
@golang golang locked and limited conversation to collaborators Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants