Rewrite any git:// urls to be https:// but, it won't touch sshurls ([email protected]:)
git config --global url."https://github".insteadOf git://githubUse ssh instead of https://
git config --global url."[email protected]:".insteadOf "https://github.com/"
you have two options. In the below examples, the match is specific to an organization (ex you want to force ssh when working with your company's projects but https is fine for public projects). Just filter on and replace less if you want less.
Option 1: Entirely in gitconfig. The
ssh://is required to change ports.Option 2: Use replacement in git config as well as replacement in ssh config.