|
1 | 1 | # pinentry-wsl-ps1 |
2 | | -pinentry GUI for Windows WSL (useful for GPG) |
| 2 | + |
| 3 | +GUI for GPG within Windows WSL for passwords, pins, etc. |
| 4 | +Optional persistence of passwords into Windows Credential Manager |
| 5 | + |
| 6 | +(c) 2018 Dale Phurrough |
| 7 | +Licensed under the Mozilla Public License 2.0 |
| 8 | + |
| 9 | +## Features |
| 10 | + |
| 11 | +* Allows GnuPG to prompt and read passphrases by the pinentry protocol |
| 12 | +with a GUI when running within WSL (Windows Subsystem for Linux) |
| 13 | +* Works for all keys managed by gpg-agent (GPG, SSH, etc) |
| 14 | +* Drop-in replacement GUI to pinentry-curses, pinentry-gtk-2, etc. |
| 15 | + |
| 16 | +## Setup |
| 17 | + |
| 18 | +1. Save the `pinentry-wsl-ps1.sh` script and set its permissions to be executable |
| 19 | +2. Configure gpg-agent to use this script for pinentry using |
| 20 | + one of the following methods |
| 21 | + * Set pinentry-program within ~/.gnupg/gpg-agent.conf to the script's path, e.g. |
| 22 | + `pinentry-program /mnt/c/repos/pinentry-wsl-ps1/pinentry-wsl-ps1.sh` |
| 23 | + * ... or, set the path to this script when you launch gpg-agent, e.g. |
| 24 | + `gpg-agent --pinentry-program /mnt/c/repos/pinentry-wsl-ps1/pinentry-wsl-ps1.sh` |
| 25 | +3. Optionally enable persistence of passwords. |
| 26 | + 1. Follow instructions https://github.com/davotronic5000/PowerShell_Credential_Manager |
| 27 | + to install the needed module from the Powershell Gallery or GitHub. |
| 28 | + 2. Note security perspectives like https://security.stackexchange.com/questions/119765/how-secure-is-the-windows-credential-manager |
| 29 | + 3. Edit the script and set `PERSISTENCE` to one of the values: |
| 30 | + * `""` no persistence |
| 31 | + * `"Session"` persists the password only for the current Windows login session |
| 32 | + * `"LocalMachine"` persists the password for the current Windows login on the local Windows computer |
| 33 | + * `"Enterprise"` persists the password for the current Windows login and requests Windows Credential Manager to synchronize it across Windows computers for that same Windows login |
| 34 | + |
| 35 | +## References |
| 36 | + |
| 37 | +* https://www.gnupg.org/software/pinentry/index.html |
| 38 | +* https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html |
| 39 | +* https://github.com/GPGTools/pinentry/blob/master/doc/pinentry.texi |
| 40 | +* https://gist.github.com/mdeguzis/05d1f284f931223624834788da045c65 |
| 41 | +* https://github.com/GPGTools/pinentry/blob/master/pinentry/pinentry.c |
0 commit comments