Info
I use a Smartcard for many recurring and non-recurring tasks in my workflow.
Therefore, they need to be accessible from within WSL, for me to use WSL as a complete replacement of a Windows dev setup.
Previously (especially with WSL v1), this was an absolute pain in the butt! With WSL2 and better support overall, it’s actually not that bad.
Install and Configure
For usbipd-win, there should be nothing more to do and should just work.
For GPG, most of the configuration is already done by my dotfiles, for example, updating the TTY, which is done in my supplied ~/.bash_profile
file:
gpg-connect-agent updatestartuptty /bye
One thing I do, is to update my Chezmoi remote URL, to point to the SSH Address instead of the default HTTPS one, so I can author changes and push them, all using my smart card.
Make sure you have SSH installed, as well as netcat (the OpenBSD variant), if you’re behind a proxy.
chezmoi git remote set-url origin git@github.com:DustVoice/dotfiles.git
Replace
DustVoice
: With your own GitHub username
Simply Update and refresh externals afterward to make sure everything worked.