Skip to content

mensi/wsl2gpg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wsl2gpg

wsl2gpg is a small utility making it possible to use gpg in WSL (Windows Subsystem for Linux) with the agent from Gpg4win.

GnuPG's libassuan emulates sockets on Windows by listening on localhost and writing the TCP port number and a key to the "socket" file. This utility will listen on UNIX sockets in ~/.gnupg and proxy connections to the localhost TCP port. The key is automatically sent first.

With this, gpg in WSL can talk to the Gpg4win agent in Windows.

Usage

You can either install wsl2gpg with pip:

pip install wsl2gpg

Or alternatively just copy __init__.py somewhere and make it executable with chmod +x

Then, append a line to your .bashrc (or rc file of your favorite shell) to run wsl2gpg when you log in:

wsl2gpg -q -i &

You should then be able to use gpg in WSL as usual. For example, to show information on a Yubikey / smartcard:

$ gpg --card-status
Reader ...........: Yubico Yubikey 4 OTP U2F CCID 0
[...]

Potential Issues

Should the Windows user detection not work, you can set the username manually:

wsl2gpg -u yourwindowsuername

About

Create UNIX sockets and proxy to the gpg4win agent

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages