git config --global url."git@github.com:".insteadOf "https://github.com/"
cat ~/.gitconfig
[url "git@github.com:"]
insteadOf = https://github.com/
go get github.com/private/repo
This depends on the host.
vim ~/.netrc
machine gitlab.com login joaquin.noe@yo.com password jonoe-yoyoyoyoyo