Where does GPG Agent store the passphrase — I need to restore it

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I forgot my GPG key passphrase.



I know my computer is storing it somewhere because I decrypt strings with it, without a password, for example:



$ gpg --decrypt -r me@example.com ~/.password-store/gmail.gpg 
You need a passphrase to unlock the secret key for
user: "Example <me@example.com>"
2048-bit RSA key, ID 02BFF027, created 2014-10-04 (main key ID 410A4C4A)
gpg: NOTE: secret key 02BFF027 expired at Thu 4 Oct 17:30:49 2018 EDT
gpg: encrypted with 2048-bit RSA key, ID 02BFF027, created 2014-10-04
"Example <me@example.com>"
princess


The above output manages to decrypt ~/.password-store/gmail.gpg; it knows my key is expired and it knows it needs a passphrase, but somehow it manages to decrypt the string nonetheless (my password is not "princess", this is just for illustration purposes).



I am assuming GPG Agent is being used to pass the passphrase to gpg.



Is it possible to do something like:



gpg-agent --display-passphrase 02BFF027


?









share







New contributor




alberto56 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    0
    down vote

    favorite












    I forgot my GPG key passphrase.



    I know my computer is storing it somewhere because I decrypt strings with it, without a password, for example:



    $ gpg --decrypt -r me@example.com ~/.password-store/gmail.gpg 
    You need a passphrase to unlock the secret key for
    user: "Example <me@example.com>"
    2048-bit RSA key, ID 02BFF027, created 2014-10-04 (main key ID 410A4C4A)
    gpg: NOTE: secret key 02BFF027 expired at Thu 4 Oct 17:30:49 2018 EDT
    gpg: encrypted with 2048-bit RSA key, ID 02BFF027, created 2014-10-04
    "Example <me@example.com>"
    princess


    The above output manages to decrypt ~/.password-store/gmail.gpg; it knows my key is expired and it knows it needs a passphrase, but somehow it manages to decrypt the string nonetheless (my password is not "princess", this is just for illustration purposes).



    I am assuming GPG Agent is being used to pass the passphrase to gpg.



    Is it possible to do something like:



    gpg-agent --display-passphrase 02BFF027


    ?









    share







    New contributor




    alberto56 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I forgot my GPG key passphrase.



      I know my computer is storing it somewhere because I decrypt strings with it, without a password, for example:



      $ gpg --decrypt -r me@example.com ~/.password-store/gmail.gpg 
      You need a passphrase to unlock the secret key for
      user: "Example <me@example.com>"
      2048-bit RSA key, ID 02BFF027, created 2014-10-04 (main key ID 410A4C4A)
      gpg: NOTE: secret key 02BFF027 expired at Thu 4 Oct 17:30:49 2018 EDT
      gpg: encrypted with 2048-bit RSA key, ID 02BFF027, created 2014-10-04
      "Example <me@example.com>"
      princess


      The above output manages to decrypt ~/.password-store/gmail.gpg; it knows my key is expired and it knows it needs a passphrase, but somehow it manages to decrypt the string nonetheless (my password is not "princess", this is just for illustration purposes).



      I am assuming GPG Agent is being used to pass the passphrase to gpg.



      Is it possible to do something like:



      gpg-agent --display-passphrase 02BFF027


      ?









      share







      New contributor




      alberto56 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I forgot my GPG key passphrase.



      I know my computer is storing it somewhere because I decrypt strings with it, without a password, for example:



      $ gpg --decrypt -r me@example.com ~/.password-store/gmail.gpg 
      You need a passphrase to unlock the secret key for
      user: "Example <me@example.com>"
      2048-bit RSA key, ID 02BFF027, created 2014-10-04 (main key ID 410A4C4A)
      gpg: NOTE: secret key 02BFF027 expired at Thu 4 Oct 17:30:49 2018 EDT
      gpg: encrypted with 2048-bit RSA key, ID 02BFF027, created 2014-10-04
      "Example <me@example.com>"
      princess


      The above output manages to decrypt ~/.password-store/gmail.gpg; it knows my key is expired and it knows it needs a passphrase, but somehow it manages to decrypt the string nonetheless (my password is not "princess", this is just for illustration purposes).



      I am assuming GPG Agent is being used to pass the passphrase to gpg.



      Is it possible to do something like:



      gpg-agent --display-passphrase 02BFF027


      ?







      gpg gpg-agent





      share







      New contributor




      alberto56 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      alberto56 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      alberto56 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 5 mins ago









      alberto56

      1011




      1011




      New contributor




      alberto56 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      alberto56 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      alberto56 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          alberto56 is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475352%2fwhere-does-gpg-agent-store-the-passphrase-i-need-to-restore-it%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          alberto56 is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          alberto56 is a new contributor. Be nice, and check out our Code of Conduct.












          alberto56 is a new contributor. Be nice, and check out our Code of Conduct.











          alberto56 is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475352%2fwhere-does-gpg-agent-store-the-passphrase-i-need-to-restore-it%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?