golang 使用私有仓库(go get https 转 ssh)

针对 gitlab go get https 转 ssh:

1
2
3
vim ~/.gitconfig
[url "git@gitlab.mygitlab.com:"]
insteadOf = https://gitlab.mygitlab.com

或直接使用命令:

1
git config --global url."git@gitlab.mygitlab.com:".insteadOf "https://gitlab.mygitlab.com"
1
dep ensure ......