Skip to main content

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

Metadata

Release files for wsl2gpg 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wsl2gpg 0.0.2
File Size Uploaded Provenance Actions
wsl2gpg-0.0.2.tar.gz 4.4 kB Without provenance Details for wsl2gpg-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wsl2gpg 0.0.2
File Interpreter ABI Platform Actions
wsl2gpg-0.0.2-py3-none-any.whl Python 3 none any Details for wsl2gpg-0.0.2-py3-none-any.whl

Total release size: 13.2 kB

Release files / wsl2gpg-0.0.2.tar.gz

Download URL wsl2gpg-0.0.2.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7c7a19296539927762e43ffff4b6f76b3a7d9812ee026bbde6f6ebc2a878a92b
BLAKE2b-256 checksum
How to use checksums
62dd2e3812ef867d480135d412a76a52be82b68f6f1064d37b90b2b673557e4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

Release files / wsl2gpg-0.0.2-py3-none-any.whl

Download URL wsl2gpg-0.0.2-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
812214aa2e17df6cac5e9fafbf3c788d3724eecbe9afea1685a63cdd979ec21b
BLAKE2b-256 checksum
How to use checksums
9a22a0fa3d269f60f4109dd521b7d4f8b5534c131ac8f5db02a32fb78eb97189
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

Security for wsl2gpg 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page