Skip to content

heilingbrunner/vscode-gnupg-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GnuPG Tool

GnuPG Tool logo

GitHub license

What's new in GnuPG-Tool

  • bugfix to check keyring location, which caused 'GnuPG not available' message
  • security update

Features

  • Supports GnuPG v1.4, v2.2, v2.3 and v2.4
  • Check GnuPG availability/version.
  • Encryption for multiple recipients or with simple passphrase
  • Encrypt/decrypt text or file to text, file or preview
  • Passphrase/Pin entry only into original GnuPG Pinentry dialog. Not through Visual Studio Code or something else.
  • End session to reset password cache by killing gpg-agent.
  • Works with smartcards.
  • Sign/verify file.
  • Keys generate/edit/delete/import/export.
  • Detects local/alternated homedir/key ring
  • Code folding for BEGIN PGP .../END PGP ... blocks
  • README.md with links to github wiki

Supported locales

The extension is available in multiple languages (Google Translator):

  • de
  • en
  • es
  • fr
  • ru
  • zh-CN

Decrypt-Selection

The command palette ...

Command palette

Available commands:

The explorer context menu ...

Explorer context menu

The editor context menu ...

Editor context menu

Used References

Usage

Used File extensions

The *.asc Files

  • <filename>.<ext>.asc: This should be an ascii encrypted file (option: --armor) of the <filename>.<ext> file.
  • It although can be an ascii encoded key file.

The *.sig Files

  • <filename>.<ext>.sig: This should be an ascii encoded signature file corresponding to <filename>.<ext>.

The *.key Files

  • <filename>.key: This should be an ascii encrypted key (option: --armor)

The Clipboard

This extension uses simple command line tools to copy content (commands, fingerprints, key ids) to the clipboard.

  • Windows: CLIP
  • MacOS: PBCOPY
  • Linux: XCLIP

Support for an alternate homedir/key ring

When VSCode is opened in a folder with (file:pubring.kbx OR file:pubring.gpg) AND (folder:private-keys-v1.d OR file:secring.gpg) included, then the --homedir parameter is used in every command of this VSCode instance. Additionally the extension supports a workspace configuration to set the path for the keyring. Consequently there is a order for the keyring location:

  1. Use local keyring in workspace, when detected
  2. When not 1. , then check for GnuPG.homedir configuration
  3. When not 2. , then use GnuPG default keyring location

Using several VSCode instances at the same time is not recommended, because the gpg-agent is running in the background for one session. Otherwise you have to kill the session. TIP: Change folder in one instance, because gpg-agent will be killed automatically.

Use Check GnuPG command to see the current used home directory.

Support for GnuPG v1.4

With GnuPG v1.4, there is no pinentry window, where you can enter a pin. Therefore, all commands, which require a pin input, will be prepared to run in the internal terminal. The commands are written to the terminal and you have to press RETURN and follow the instructions. Some functions are not available at all. GnuPG does not work perfectly in the VSCode terminal, or in other terminal emulators (hyper, cmder, ...). Therefore all commands for the terminal are additionally copied to the clipboard so that you can insert them in a real terminal window (cmd, bash, ...).

Requirements

GnuPG

Windows

  • Use pure GnuPG installation (gnupg-w32-<version>_<date>.exe)
  • or Gpg4win

OSX

Debian

Raspbian

  • additional QT based PIN or pass-phrase entry dialog for GnuPG, or equivalent, is required