How to handle gpg agent in WSL?

I tried to free Jar and gpg-agent did not start. According to https://www.gnupg.org/documentation/manuals/gnupg-devel/Invoking-GPG_002dAGENT.html , it should start automatically when any GnuPG program is called, but this does not seem to be true in WSL.

pupeno@DESKTOP-5N8VFOD :~$ gpg-agent gpg-agent: no gpg-agent running in this session 

For a moment, I thought that maybe GnuPG just wonโ€™t work in WSL, but I managed to start it manually:

 pupeno@DESKTOP-5N8VFOD :~$ eval $(gpg-agent --daemon) pupeno@DESKTOP-5N8VFOD :~$ gpg-agent gpg-agent: gpg-agent running and available 

So what is missing? Why doesnโ€™t it start automatically? or how do i start it?

+5
source share
1 answer

Do you want gpg-agent to start automatically (?). So you need to put it in the shell of the bash shell ( ~/.bashrc ).

 echo 'eval $(gpg-agent --daemon)' >> ~ /.bashrc 
0
source

Source: https://habr.com/ru/post/1262476/


All Articles