We have a private code repository accessible only through ssh/git (no https), and we would like to host our go code/modules there.
First I tried:
git config --global url."git@code.internal.local:".insteadOf "https://code.internal.local/"
so, both of the following work just fine:
git clone git@code.internal.local:reponame.gitgit clone https://code.internal.local/reponame
But go get code.internal.local/reponame fails, as go still insists on trying https://... not git.
package code.internal.local/reponame: unrecognized import path "code.internal.local/reponame": https fetch: Get "https://code.internal.local/reponame?go-get=1": dial tcp 192.168.0.5:443: i/o timeout