Ghost docs
Connecting over SSH

Using SSH with a repository

Clone over SSH, or move an existing remote onto it.

Clone

Take the URL from the Code panel on the repository, SSH tab:

git clone ssh://git@<host>:1031/octocat/hello.git

Move an existing repository onto SSH

git remote -v
git remote set-url origin ssh://git@<host>:1031/octocat/hello.git
git remote -v

Nothing else changes: the same commits, the same branches, no re-clone.

Drop the port from the URL

If typing :1031 grates, name the host once in ~/.ssh/config:

Host ghost
  HostName <host>
  Port 1031
  User git
  IdentityFile ~/.ssh/id_ed25519

Then the remote is short, and ssh ghost is enough to test it:

git remote set-url origin ghost:octocat/hello.git

What SSH does and does not change

  • Pushing is identical. The same checks run, and a push that is refused over HTTP is refused over SSH for the same reason.
  • Private repositories you own are readable over SSH; someone else's read as if they do not exist.
  • Signed commits are unrelated. Signing uses a GPG key, and the Verified badge does not care which transport carried the commit.

On this page