gpg- एजेंट तक नहीं पहुंचा जा सकता


11

एक नए उबंटू 16.04 इंस्टॉलेशन पर, मैं अपने डेटाबेस बैकअप के लिए gpg का उपयोग करना चाहूंगा, लेकिन मेरे पास gpg-agentकाम नहीं हो सकता ।

postgres@db:~$ gpg -s test.txt

You need a passphrase to unlock the secret key for
user: "Nicolas Remond <nicolas@xxx.com>"
2048-bit RSA key, ID F5DECA47, created 2016-11-03

gpg: gpg-agent is not available in this session
Enter passphrase: 

इसके अलावा, ऐसा लगता है कि एक gpg- एजेंट चल रहा है जैसा कि मैंने पहले किया था:

postgres@db:~$ gpg-agent
gpg-agent[1715]: no gpg-agent running in this session
postgres@db:~$ gpg-connect-agent /bye
gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to agent established
postgres@db:~$ pidof gpg-agent
1762

और gpg विन्यास की use-agentसेटिंग है:

postgres@dbmaster0:~$ cat ~/.gnupg/gpg.conf | grep use-agent
# For Ubuntu we now use-agent by default to support more automatic
use-agent

मुझे किसकी याद आ रही है ?


एजेंट के साथ शुरू करें --log-file [myfile]और देखें कि क्या यह आपको लॉग में कोई त्रुटि देता है।
— रनिज़

मेरे पास सही त्रुटि संदेश है gpg: gpg-agent is not available in this session। अगर मेरे पास एक लॉग होता है कि आप कैसे सुझाव देते हैं, तो मेरे पास सब कुछ है:2016-12-19 13:39:39 gpg-agent[10957] gpg-agent (GnuPG) 2.1.11 started
— n1r3

मैंने मैन्युअल रूप से सेट करने की कोशिश की GPG_AGENT_INFO, लेकिन मुझे नहीं पता कि कैसे सेट किया जाए ... कि जब मुझे ए gpg: problem with the agent - disabling agent use।
— n1r3

रूट के रूप में, सेटिंग export GPG_AGENT_INFO=/var/lib/postgresql/.gnupg/S.gpg-agent:0:1काम करती है, लेकिन उपयोगकर्ता के रूप में नहीं। इसके अलावा, ऐसा लगता है कि मुझे मैन्युअल रूप से करना होगा, नहीं?
— n1r3

क्या आपने इस GPG_TTY = $ (tty) को GPG_TTY को अपने .bashrc फ़ाइल में _man gpg-agent पृष्ठ में बताए अनुसार निर्यात किया ?
— जॉर्ज उदेन

जवाबों:


13

किसी और के मामले में खुद को जवाब देने पर।

Ubuntu 16.04 पर, डिफ़ॉल्ट संस्करण हैं:

    # gpg --version
    gpg (GnuPG) 1.4.20

तथा

    # gpg-agent --version
    gpg-agent (GnuPG) 2.1.11

वे संगत नहीं हैं। GPG2 का उपयोग करना अनिवार्य है:

    # gpg2 --version
    gpg (GnuPG) 2.1.11

0

समाधान स्थापित करना है gpgv2:

sudo apt install gpgv2

ऐसा इसलिए है क्योंकि gpg-एजेंट जो उबंटू के साथ आता है, वह संस्करण 2 है और यह संस्करण 2 के साथ gpg से जुड़ने की कोशिश करता है। लेकिन Ubuntu में gpg संस्करण स्थापित है।


3
शायद आप का मतलबgnupg2
— Dmitriusan
हमारी साइट का प्रयोग करके, आप स्वीकार करते हैं कि आपने हमारी Cookie Policy और निजता नीति को पढ़ और समझा लिया है।
Licensed under cc by-sa 3.0 with attribution required.