Automatically create ssh keys in gh cs ssh#5752
Conversation
|
@cli/codespaces, @mislav this is still pending a codespaces service prod release, but is up and running in PPE (see the gif in the description 🎉 ). If we can get 👀 on this before the release that would help keep things rolling - thanks! |
markphelps
left a comment
There was a problem hiding this comment.
lgtm. I would recommend adding a Do Not Merge label or simliar to it so that it doesnt get released by mistake before the backend changes are ready
josebalius
left a comment
There was a problem hiding this comment.
This is looking good! I've been away on vacation so apologies for the late review.
Left some initial comments.
mislav
left a comment
There was a problem hiding this comment.
This is shaping up well, but I would generally simplify the APIs.
josebalius
left a comment
There was a problem hiding this comment.
I think this is almost there, left some comments mostly about errors. I couldn't think of a better name for ssh.Context so good with me as is 👍
|
The service release needed for this just went out 🚀 |
Fixes: https://github.com/github/codespaces/issues/8154
Adds automatic ssh key generation to
gh cs sshandgh cs cpcommands, effectively removing the need for the user to already have set up ssh keys in GitHub.The key is named
codespacesand is stored under~/.ssh. If it already exists it is just reused, otherwise it is generated without prompt and without passphrase. When starting the ssh server on the codespace (over the RPC call), an additional argument is sent, which is the public key. The codespace agent will append this public key to theauthorized_keysfile.This functionality requires a change in the codespaces agent to support, so it should NOT be merged until that change is released.