Skip to content
gohacks.dev
Tooling

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
HTTPShttps://github.com/acme/app.git
Web pagehttps://github.com/acme/app
Switch this clonegit remote set-url origin [email protected]:acme/app.git
Rewrite all HTTPS to SSHgit config --global url."[email protected]:".insteadOf "https://github.com/"
npm dependency"app": "git+ssh://[email protected]/acme/app.git"
Go module pathgithub.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.

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.

Share

Frequently asked questions

How do I switch a repository from HTTPS to SSH?
git remote set-url origin [email protected]:owner/repo.git, then git remote -v to confirm.
Why does git ask for a password with an SSH URL?
The SSH key is not loaded in the agent or not added to your account. ssh -T [email protected] tests the key.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools