Git Remote URL Converter
Convert a Git remote URL between SSH (git@host:owner/repo.git), ssh:// with a port and HTTPS, with the git remote set-url and insteadOf commands to switch.
Free · No sign-up · Your inputs stay in your browser
Input
Convert Git remote URLs between SSH and HTTPS
Output
github.com/acme/app
| SSH | [email protected]:acme/app.git |
|---|---|
| HTTPS | https://github.com/acme/app.git |
| Web page | https://github.com/acme/app |
| Switch this clone | git remote set-url origin [email protected]:acme/app.git |
| Rewrite all HTTPS to SSH | git config --global url."[email protected]:".insteadOf "https://github.com/" |
| npm dependency | "app": "git+ssh://[email protected]/acme/app.git" |
| Go module path | github.com/acme/app |
SSH remotes authenticate with your key and never prompt; HTTPS remotes need a token (GitHub stopped accepting account passwords for Git in 2021). The scp-like form git@host:path cannot carry a port, so a server on a non-standard SSH port needs the ssh:// form. insteadOf rewrites URLs on the fly, which fixes submodules and dependencies declared with HTTPS.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
SSH or HTTPS
SSH authenticates with a key and never asks for a password; HTTPS needs a token, since GitHub stopped accepting account passwords for Git operations in 2021, usually stored by a credential helper. Corporate networks that block port 22 are the main reason to use HTTPS. Git's url.insteadOf setting rewrites URLs globally, which also fixes submodules and dependencies declared with the other scheme.
Ports
The short git@host:path form cannot carry a port. A server listening on a non-standard SSH port needs ssh://git@host:2222/path.