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."[email protected]:".insteadOf "https://code.internal.local/"
so, both of the following work just fine:
git clone [email protected]:reponame.git
git 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