Skip to content

SSH and GPG keys #695

Closed
Closed

Description

@Just-Insane

Description

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

  1. 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.

  1. 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.

Activity

  1. nwtnsqrd commented on May 24, 2019

    @nwtnsqrd
    Contributor

    +1

  2. nhooyr commented on Jan 28, 2020

    @nhooyr
    Contributor

    Will add to the FAQ.

  3. Just-Insane commented on Feb 20, 2020

    @Just-Insane
    Author

    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 :/

  4. nhooyr commented on Feb 20, 2020

    @nhooyr
    Contributor

    The FAQ is nearly complete, this is the last missing question at the moment. See #1338

    Will reopen so I don't forget.

  5. reopened this on Feb 20, 2020
  6. nhooyr commented on Feb 20, 2020

    @nhooyr
    Contributor

    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.

  7. self-assigned this
    on Feb 20, 2020
  8. Just-Insane commented on Feb 20, 2020

    @Just-Insane
    Author

    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.

    Screen Shot 2020-02-19 at 11 19 44 PM

  9. nhooyr commented on Feb 20, 2020

    @nhooyr
    Contributor

    Ah this is a bug it’s using the terminal of the code server process instead of prompting.

    Cc @code-asher

  10. code-asher commented on Feb 20, 2020

    @code-asher
    Member
  11. nhooyr commented on Feb 20, 2020

    @nhooyr
    Contributor

    What does vscode do?

  12. code-asher commented on Feb 21, 2020

    @code-asher
    Member
  13. nhooyr commented on Mar 30, 2020

    @nhooyr
    Contributor

    Opened #1464

  14. nhooyr commented on Apr 20, 2020

    @nhooyr
    Contributor

    This is documented in the FAQ by sshcode/exposing code-server section.

  15. kaaax0815 commented on Feb 15, 2021

    @kaaax0815

    I can't sign using the Integrated Commit Tool, when using the Terminal it works.

    What does vscode do?

    It spawns a window, where you can enter the password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions