Open a git repository over SSH
gitto can open a git repository over SSH, on another machine like a dev box, a VM or a server. git runs on that
machine. gitto sends it the same commands it would run on your computer and shows the result. Nothing is copied to
your computer and nothing is installed on the server. The server only needs git and a POSIX shell.
1. Open over SSH
Choose File → Open over SSH… (⌥⌘O on macOS, Ctrl+Alt+Shift+O on Windows and Linux). The Home tab opens on the SSH form.
Pick a host from the list or type one. The list comes from your ~/.ssh/config, including the files it pulls in
with Include. You can type a host alias, user@host or ssh://user@host:port.
Advanced has the user, the port, an identity file and Forward SSH agent. Leave them empty to use what your SSH config says.
2. Pick the repository
- Browse lists the folders on the host. Go into the repository’s folder and open it.
- Find Repositories looks for git repositories in your home directory on the host, four folders deep. It skips
folders like
node_modules,vendor,targetand.cache.
The repository opens in a tab, like a local one. gitto remembers it in the Home tab and in Open Recent.
Clone and New Repository work on a host too: the clone or the new repository is created on that machine.
3. Or open it from the command line
gitto devbox:projects/app
gitto me@devbox:projects/app
gitto ssh://me@devbox:2222/srv/app
A path without a leading / starts in your home directory on the host.
Passwords and passphrases
gitto uses your SSH agent and keys as they are. When a key needs a passphrase or the host asks for a password, gitto
shows a prompt and passes the answer to ssh. It doesn’t store it.
Pushing and pulling from the server
git runs on the server, so git push and git pull use the server’s keys. If the server has no key for your git
host, turn on Forward SSH agent. The server then uses the keys loaded in the agent on your computer, as long as
gitto is connected.
One connection per host
gitto opens one SSH connection to each host and sends every git command through it (ControlMaster). So each
command needs one round trip, without a new handshake. The connection stays open for ten minutes after the last
command.
On Windows, gitto uses the SSH client that comes with Windows, which can’t share a connection. Each git command opens its own connection, so a repository over SSH is a bit slower there than on macOS or Linux.
gitto checks the repository for changes every three seconds, so changes made on the host show up without a refresh. You can change the interval in Settings → General → Remote polling.
Terminal and editor
- Open in Terminal starts an SSH session in the repository’s folder, in the terminal you chose in Settings → Integration.
- Open in Editor uses VS Code with Remote-SSH by default. To use another editor, write its command in
Settings → Integration → Editor command.
{host}becomes the SSH host and{path}the folder or file. For Zed:
zed ssh://{host}{path}
Your custom commands run on the host too, in the repository’s folder.
Extra SSH options
gitto passes everything in your SSH config to ssh. For options you only want in gitto, set GITTO_SSH_OPTIONS
before starting it, for example:
GITTO_SSH_OPTIONS="-o StrictHostKeyChecking=accept-new" gitto
Questions
What does the server need?
git and a POSIX shell. gitto installs nothing there and copies nothing to your computer.
Does it use my SSH config?
Yes. gitto runs the ssh command of your computer, so host aliases, ProxyJump, keys and your agent work the same way they do in a terminal.
Can I push and pull from the server with the keys on my laptop?
Turn on Forward SSH agent in the Advanced options when you open the repository.
Is it slow on a far away server?
gitto keeps one SSH connection open and reuses it, so each git command needs one round trip and no new handshake. On Windows this isn’t possible, see below.