Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: GPG forwarding #3053

Closed
2 tasks done
chrmarti opened this issue May 27, 2020 · 3 comments
Closed
2 tasks done

Test: GPG forwarding #3053

chrmarti opened this issue May 27, 2020 · 3 comments

Comments

@chrmarti
Copy link
Contributor

chrmarti commented May 27, 2020

Refs: #72

Complexity: 3

Create Issue


  • Install GPG locally (E.g., GPGTools for Mac, Gpg4win for Windows).
    • Note that one pitfall can be that an already running VS Code might not have the new install on its PATH yet. Restart VS Code to be sure.
  • List existing keys: gpg --list-secret-keys --keyid-format LONG
  • Generate a new key if you don't have one already: gpg --gen-key
  • Test installation locally:
    • Test file: echo test > test.txt
    • Sign: gpg --output test.sig --detach-sig test.txt
    • Verify: gpg --verify test.sig test.txt
  • Create Dockerfile in empty folder:
FROM mcr.microsoft.com/vscode/devcontainers/base:0-alpine-3.10
RUN apk update \
    && apk add --no-cache gnupg
  • Open folder and run Remote-Containers: Reopen in Container command.
    • Pick From 'Dockerfile' in configuration picker.
  • Check the socket and two files are in the container: ls ~/.gnupg should show S.gpg-agent pubring.kbx trustdb.gpg
  • Repeat the above test in the container:
    • Test file: echo test > test.txt
    • Sign: gpg --output test.sig --detach-sig test.txt
    • Verify: gpg --verify test.sig test.txt

If there is time: Repeat with a Debian base image:

  • Create .devcontainer.json in an empty folder:
{
	"image": "node:12",
	"remoteUser": "node"
}
  • Reopen folder in container.
  • Repeat above tests in container.
    (Note: Using user node because root in this particular image comes with files in ~/.gnupg and we don't overwrite existing files.)

/fyi @Chuxel In case any of this helps with documentation.

@chrmarti chrmarti added this to the May 2020 milestone May 27, 2020
@airtonix
Copy link

Needs:

  • opt in flag in vscode settings
  • support installing gnupg via .devcontainer.json postCreateCommand (we're not modifying our dockerfiles)

@bpasero
Copy link
Member

bpasero commented Jun 2, 2020

Verified both for the Dockerfile as well as .devcontainer.json on Linux (Ubuntu 18).

@bpasero bpasero removed their assignment Jun 2, 2020
@connor4312
Copy link
Member

Works beautifully

@connor4312 connor4312 removed their assignment Jun 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants