You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have some documentation regarding the use of SSH and/or GPG keys with code-server.
Currently, the supported methods would be to either store the private keys on the server running code-server, or use a forwarded ssh session to the local machine where the keys are stored.
Option 2, with a forwarded session, is handled nicely by sshcode however it would be nice if this was mentioned somewhere.
Of course, this breaks the idea of being able to work from any device with a web browser.
Example Workflows
Clone/push/pull to git
Anytime you need to work with a repository, you would need to either use basic authentication (username & password) or ssh keys. I would be surprised if most people were using password-based authentication.
Signing commits
When you want to sign a commit, you need access to your private GPG key. Generally, you would want to keep this in as few locations as possible. In my case, I keep the key on a yubikey.
Related Issues
I was unable to find any issues or documentation related to using SSH or GPG keys with code-server.
I've finally gotten around to using code-server some more, and am having some issues (I suspect I'm expecting too much of the program).
I've created new SSH and GPG keys on my server, and setup git to use them to push/pull and sign my commits. The problem is that using the code-server commit option fails due to a lack of pinentry (I suspect). I then have to open the terminal and commit my changes manually.
I suspect there is no way of prompting the user to enter their pin via the browser itself :/
I've created new SSH and GPG keys on my server, and setup git to use them to push/pull and sign my commits. The problem is that using the code-server commit option fails due to a lack of pinentry (I suspect). I then have to open the terminal and commit my changes manually.
Remove pin entry from your gpg config and it should work fine.
I think we'd need to create our own pinentry. Maybe something like
`code-server --pinentry` which will show a prompt in the browser via
the currently running code-server instance then spit out the response.
Either that or some trickery with parsing code-server's own stdout and
when it sees the password prompt text it could show a prompt in the
browser and then write out the result to stdin.
Activity
nwtnsqrd commentedon May 24, 2019
+1
nhooyr commentedon Jan 28, 2020
Will add to the FAQ.
Just-Insane commentedon Feb 20, 2020
Any update on the FAQ?
I've finally gotten around to using code-server some more, and am having some issues (I suspect I'm expecting too much of the program).
I've created new SSH and GPG keys on my server, and setup git to use them to push/pull and sign my commits. The problem is that using the code-server commit option fails due to a lack of pinentry (I suspect). I then have to open the terminal and commit my changes manually.
I suspect there is no way of prompting the user to enter their pin via the browser itself :/
nhooyr commentedon Feb 20, 2020
The FAQ is nearly complete, this is the last missing question at the moment. See #1338
Will reopen so I don't forget.
nhooyr commentedon Feb 20, 2020
Remove pin entry from your gpg config and it should work fine.
Just-Insane commentedon Feb 20, 2020
I've removed the pinentry settings from gpg-agent.conf, and rebooted, however this does not seem to have made a difference.
When trying to commit, it still says failed to sign the data. Doing it via CLI still prompts for a password.
nhooyr commentedon Feb 20, 2020
Ah this is a bug it’s using the terminal of the code server process instead of prompting.
Cc @code-asher
code-asher commentedon Feb 20, 2020
nhooyr commentedon Feb 20, 2020
What does vscode do?
code-asher commentedon Feb 21, 2020
nhooyr commentedon Mar 30, 2020
Opened #1464
nhooyr commentedon Apr 20, 2020
This is documented in the FAQ by sshcode/exposing code-server section.
kaaax0815 commentedon Feb 15, 2021
I can't sign using the Integrated Commit Tool, when using the Terminal it works.
It spawns a window, where you can enter the password