Giter Site home page Giter Site logo

Comments (8)

TheLocehiliosan avatar TheLocehiliosan commented on May 13, 2024 5

@sooheon Not sure if you are still having this issue, but it seems that you need to have GPG_TTY exported in your shell for GNUPG to work properly.

Solution:

export GPG_TTY=$(tty)

https://twitter.com/xianpants/status/822532532226953217

Hat-tip to @christiannelson

Cheers

from yadm.

TheLocehiliosan avatar TheLocehiliosan commented on May 13, 2024

I suspect this is an issue with your general gpg configuration. (possibly gpg-agent).

Are you able to encrypt and decrypt a simple string like this:

    echo testing | gpg -c | gpg

from yadm.

sooheon avatar sooheon commented on May 13, 2024

You're right, the above fails with the same message. gpg-agent says "no gpg-agent running in this session". Will read through the GPG how-to, feel free to close if you think it's out of scope.

from yadm.

TheLocehiliosan avatar TheLocehiliosan commented on May 13, 2024

@sooheon I'm closing this issue, but feel free to reach out to me if you're still having this problem. Maybe I can help figure it out.

from yadm.

TheLocehiliosan avatar TheLocehiliosan commented on May 13, 2024

Opening this issue to track adding the info to the FAQ

from yadm.

faelin avatar faelin commented on May 13, 2024

export GPG_TTY=$(tty)

This did not solve the problem for me! In fact, it made it worse because, after running that export, GPG would just hang until I used an escape-sequence to terminate the shell.

Instead, I was able to resolve the issue using this suggestion from stack overflow (running on Mac OS 10.14.6, GPG v2.2.27 managed by Homebrew):

add this to ~/.gnupg/gpg.conf:

use-agent 
pinentry-mode loopback

Then add this to ~/.gnupg/gpg-agent.conf

allow-loopback-pinentry

Then restart the agent with echo RELOADAGENT | gpg-connect-agent.

For convenience, here is a copy/paste block (will only add the appropriate lines if they aren't already in your config):

grep -qsxF "pinentry-mode loopback" ~/.gnupg/gpg.conf || echo "use-agent\npinentry-mode loopback" >> ~/.gnupg/gpg.conf
grep -qsxF "allow-loopback-pinentry" ~/.gnupg/gpg-agent.conf || echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
echo RELOADAGENT | gpg-connect-agent

from yadm.

duhd1993 avatar duhd1993 commented on May 13, 2024

@faelin This workaround will cause other commands depending on pinentry fail. Just read some issues on homebrew, the best way seems to be using pinentry-mac instead of pinentry on a mac machine.

brew install pinentry-mac

and add

pinentry-program /usr/local/bin/pinentry-mac

to ~/.gnupg/gpg-agent.conf

from yadm.

jcburley avatar jcburley commented on May 13, 2024

@faelin This workaround will cause other commands depending on pinentry fail. Just read some issues on homebrew, the best way seems to be using pinentry-mac instead of pinentry on a mac machine.

brew install pinentry-mac

and add

pinentry-program /usr/local/bin/pinentry-mac

to ~/.gnupg/gpg-agent.conf

Doesn't work for me; I get the pinentry window, but all typing continues to go into the shell, even after clicking in the entry field. (Should there be more than just that one line in gpg-agent.conf? Was empty on my Mac.)

from yadm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.