Skip to content

feat: a remote checkout opens with the key file a server hands out - #15

Merged
FrancescBagur merged 3 commits into
masterfrom
feat/remote-key
Nov 13, 2026
Merged

FrancescBagur merged 3 commits into
masterfrom
feat/remote-key

Conversation

@FrancescBagur

Copy link
Copy Markdown
Owner

Stacked on the terminal's pull request, because the terminal on a remote checkout uses the key too. It shows only its own commit while that one is open, and moves to master when that one lands.

What this changes

A checkout on another machine can be opened with a private key file -- the .pem a server hands out -- with its passphrase if it has one, where until now it was a password, the profile's key or the agent.

What was decided

  • A named key is that key and nothing after it. A profile's key falls back to the agent because nobody chose it for this server. This one was chosen, and a connection that quietly got in some other way would leave a key written down beside the checkout that does not open it.
  • One secret box, and it says which secret. With a key named it is the key's passphrase; with none it is the password it always was. Two boxes would be one too many for every connection there is.
  • The path is remembered, the passphrase is not. The path goes beside the checkout as a fifth field on its line in the settings -- a line written before there was a fifth still reads -- so Reconnect and the terminal knock with the same key. A key with a passphrase is reopened from the box, and in the terminal ssh asks for it itself.
  • A checkout is remembered by where it is, not by how it was reached, so opening it again with another key replaces its line instead of adding one.
  • Two things said before they go wrong. A key file that is not there is reported before anything is asked of the network, and not in libssh2's words about the format of keys. And a key other people on the machine can read, which is how a downloaded .pem arrives, opens the checkout here but is refused by ssh in the terminal, so the box says which chmod it wants.

Checked

  • cargo test passes here, not just in CI -- 396, one of them new. A second new one starts its own sshd and so runs in CI and nowhere else: this pull request is the first time it runs
  • It was run -- against an OpenSSH server in a container: an RSA key in the PEM envelope with a passphrase and one without, a wrong passphrase, none, a file that is not there; then in the window on a virtual display, the box, the saved checkout, Reconnect and the shell on that machine. The chooser button was not pressed; it is the one the profiles already use. Not on macOS or Windows
  • Anything that writes (index, stash, branches, remote) or touches the graph layout carries a test -- the settings line has one
  • Commits are signed off (git commit -s) and read as sentences

🤖 Generated with Claude Code

FrancescBagur and others added 2 commits November 12, 2026 20:19
…itory it is in

There is a Terminal button at the end of the action bar and Ctrl+` does
what it does: a panel opens under the graph, between the two side
panels, with a shell in the repository's folder. Each tab has its own.
The bar over it folds the panel, kills the shell or hides it and leaves
the shell running; a shell that exits takes the panel with it. Whether
it was open, and how tall, is remembered.

How it behaves was read out of GitKraken's bundle before any of it was
written -- the three states of the panel, what each button does to the
shell, the context menu, Ctrl+C that copies when something is selected
and interrupts when nothing is, the preferences and their limits. The
preferences are the ones that could be made to act: font size, line
height, cursor style, dimming when unfocused, and which shell.

Three things are here that are not there. The shell is started with the
name, the address and the key of the profile the repository is filed
under, so a commit typed in it is signed the way one made with the
button would be. A checkout on another machine gets a shell on that
machine, over ssh, in its folder. And since nothing here watches the
disk, the repository is looked at again once the shell has gone quiet,
and reloaded only if something moved -- a commit typed in the panel
turns up in the graph by itself.

The emulator is alacritty_terminal, eleven crates. A terminal that is
nearly right is one where vim and an interactive rebase are nearly
usable, and this one also brings the Windows pty. What is drawn is
drawn here: Fira Mono, bold by striking twice since there is only the
regular weight, and the box-drawing and block characters by hand, as
the font's own do not reach from one row to the next.

Not there: GitKraken's autocomplete suggestions, a choice of typeface,
and any letter the two bundled fonts lack. The profile is read when the
shell starts, so changing it applies to the next shell.

Run on Linux, on a virtual display. Read out of the code and not seen
on macOS or Windows, and the shell on another machine has not been
opened against one -- only the command it sends was tried, locally.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Francesc <francesc.bagur@coffeesoftware.io>
A checkout on another machine could be reached with a password, with
the profile's key or through the agent. A server that hands out a .pem
is none of the three: the key is in a file of its own, belongs to no
profile and has never been near the agent.

The box for a remote checkout has a line for that file now, with the
desktop's chooser beside it. With a key named, the secret next to it is
that key's passphrase and the box says so; with none it is the password
it always was. A key that was named is that key and nothing after it --
a profile's key falls back to the agent because nobody chose it for
this server, and this one was chosen.

Where the key is gets remembered beside the checkout, as a fifth field
on its line in the settings, so Reconnect and the terminal knock with
it too. The passphrase is remembered nowhere: a key that has one is
reopened from the box, and in the terminal ssh asks for it itself. A
checkout is now remembered by where it is and not by how it was
reached, so opening it again with another key replaces the line
instead of adding one.

Two things said before they go wrong. A key file that is not there is
reported before anything is asked of the network, in those words and
not in libssh2's about the format of keys. And a key other people on
the machine can read -- which is how a downloaded .pem arrives -- opens
the checkout here but is refused by ssh in the terminal, so the box
says which chmod it wants.

Tried against an OpenSSH server in a container: an RSA key in the PEM
envelope with a passphrase and one without, a wrong passphrase, none,
a file that is not there; then in the window, on a virtual display,
the box, the saved checkout, Reconnect and the shell on that machine.
The test that goes with it starts its own sshd and so runs in CI and
not on a desk without one; it has not run yet. The chooser button was
not pressed -- it is the one the profiles already use.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Francesc <francesc.bagur@coffeesoftware.io>
Base automatically changed from feat/terminal to master November 13, 2026 06:52
The terminal went into master squashed, so this branch and master each
carry it under a different name and Git reads the same lines as a clash.
Nothing is taken from either side: master's tree is the tree of the
terminal commit this branch already stands on.

Signed-off-by: Francesc <francesc.bagur@coffeesoftware.io>
@FrancescBagur
FrancescBagur merged commit e201394 into master Nov 13, 2026
3 checks passed
@FrancescBagur
FrancescBagur deleted the feat/remote-key branch November 13, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant