Repository navigation
feat: a remote checkout opens with the key file a server hands out - #15
Merged
Merged
Conversation
…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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
masterwhen that one lands.What this changes
A checkout on another machine can be opened with a private key file -- the
.pema 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
sshasks for it itself..pemarrives, opens the checkout here but is refused bysshin the terminal, so the box says whichchmodit wants.Checked
cargo testpasses here, not just in CI -- 396, one of them new. A second new one starts its ownsshdand so runs in CI and nowhere else: this pull request is the first time it runsgit commit -s) and read as sentences🤖 Generated with Claude Code