<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? go version go1.13 darwin/amd64 ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? GOHOSTARCH="amd64" GOHOSTOS="darwin" ### What did you do? go get [a private git repository] ### What did you expect to see? go: finding [a private git repository] latest ### What did you see instead? ```go get <a private git repository>: git ls-remote -q origin in .../gopath/pkg/mod/cache/vcs/16f915c2923b9f2121e01659f2a5b5653a94a21ba896234c4a8e5799eab95596: exit status 128: Gitea: Unauthorized Cannot find repository <repositoryname> fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` This works perfect on go1.12 but not go1.13. I have a similiar configuration on ~/.gitconfig as below: ``` [url "git@github.com:golang/"] insteadOf = https://golang.org/x/ ```