Home > Blockchain >  Git Convert All Remotes in a Repo from HTTPS to SSH
Git Convert All Remotes in a Repo from HTTPS to SSH

Time:05-07

Is there a command to programmatically convert all existing remotes on a repo from HTTPS to SSH?

For example, if I had a repo with a remote for GitHub, and another for GitLabs, and they both use HTTPS.

CodePudding user response:

There is no such command in git. But I agree with @larsks, you can use some small script, for instance with regular expression, to convert.

  • Related