I try to go get a repository from a private gitlab server, from a mac.
I set the git config (~/.gitconfig) to use ssh instead of https :
[url "git@gitlab.mysite.com:"]
insteadOf = https://gitlab.mysite.com/
When I clone the project using the https url, I get the correct replacement
$ git clone https://gitlab.mysite.com/group/project
$ cd project
$ git remote -v
origin git@gitlab.mysite.com:group/project (fetch)
origin git@gitlab.mysite.com:group/project (push)
However, when I use go get, it tries to use the https url, and fail
$ go get gitlab.mysite.com/group/project
package gitlab.mysite.com/group/project: unrecognized import path "gitlab.mysite.com/group/project" (https fetch: Get https://gitlab.mysite.com/group/project?go-get=1: x509: certificate signed by unknown authority)
Why is go get not using my git configuration ? How can I fix that ?
I know the problem is similar to this question : go get: Git settings ignored and many other question concerning private repos
my problem is different