gpg-agent is older than X?!

If you like me using gpg to store your passwords, you might encounter this issue:

gpg: starting migration from earlier GnuPG versions
gpg: WARNING: server ‘gpg-agent’ is older than us (2.X.XX < 2.X.XX)
 gpg: error: GnuPG agent version “2.X.XX” is too old.

I’m using pass (the standard unix password manage, I did try to build one myself but pass is an awesome tool!!!). If you’re also using pass you might saw that when typing pass <passowrd_key> it will return your password without entering your password.

Here’s what I found out to fix it, 
It seems like the version of the running gpg agent was different from the one pass was running (under the hood it’s GnuPG). In order to be able to read my password again I had to “kill” the running agent so the GnuPG could use the newer version (I was using -v for verbose mode).
gpgconf --kill -v gpg-agent

And that seems to fix it, since GnuPG could migrate to the newer version, Now when when I was running pass <PASSWORD_KEY> I actually had to type in my password and non of my password got effected by it (woooo that was scary for a second).

If you’re not using Pass I would highly recommend checking it out.

Also, if you find it useful or have any question let me know.