Here is my set up:
- Windows 10 machine, my desktop PC.
- Ubuntu 18 machine, this is my home server
- Yubikey, has my private GPG keys on it
My work flow is as follows:
- Plug in my Yubikey into USB port on my Windows 10 machine.
- From my Windows 10 machine, SSH into my Ubuntu machine using Putty.
- On the Ubuntu machine through Putty, use Git to commit some changes to a repository cloned on the ubuntu machine.
- Need to sign those commits on the ubuntu machine using the private keys located on my Yubikey, which is plugged into my Windows 10 machine.
I can sign commits on my Windows 10 machine directly, because I launch
gpg-agent using Gpg4Win, and it detects my USB key and prompts me to enter the PIN before I sign/encrypt anything. I want the same thing to happen when I try to sign commits in Git on the Ubuntu machine. So in a way, I'd like the existing SSH connection between my Ubuntu and Windows machine to serve as a proxy to the gpg-agent on my Windows machine, so that encryption happens on my Windows machine when invoked from Ubuntu.
I'm not sure if this is possible. The GPG agent forwarding help I find online seems to be the reverse of this: A host machine delegating encryption to a remote machine. But this is not what I'm doing, since I do not plug the yubikey into my Ubuntu server machine.
To further complicate this, these are not 2 linux machines interacting but a Windows and Linux machine. So I'm not sure if Gpg4Win being in the mix makes this harder or even impossible.
How can I sign git commits on the Ubuntu machine, using the private keys available on the Windows machine?