Jump to content
Meccep45

gpg2

Recommended Posts

установил пакет gnupg22.2.23-2utils запустил gpg2 --full-generate-key а в конце

gpg: failed to start agent '/opt/bin/gpg-agent': No such file or directory
gpg: can't connect to the agent: No such file or directory
gpg: agent_genkey failed: No agent running
Key generation failed: No agent running

где брать этот gpg-agent. хотел пароль зашифровать для msmtp.буду рад подсказке.

вот список пакетов entware.

Скрытый текст

bash - 5.1-2
busybox - 1.33.0-2
bzip2 - 1.0.8-1
ca-bundle - 20210119-1
ca-certificates - 20210119-1
coreutils - 8.32-6
coreutils-mktemp - 8.32-6
cron - 4.1-4
curl - 7.75.0-1
diffutils - 3.7-3
dropbear - 2020.81-2
entware-release - 1.0-2
findutils - 4.7.0-3
gawk - 5.1.0-1
glib2 - 2.66.4-1
gnupg2 - 2.2.23-2
grep - 3.6-1a
gzip - 1.10-3
jsonfilter - 2018-02-04-c7e938d6-1
ldconfig - 2.27-11
libacl - 2.2.53-1
libaio - 0.3.112-2
libassuan - 2.5.4-1
libatomic - 8.4.0-11
libattr - 2.4.48-2
libblkid - 2.36.1-2
libbz2 - 1.0.8-1
libc - 2.27-11
libcurl - 7.75.0-1
libedit - 20210216-3.1-1
libffi - 3.3-2
libfreetype - 2.10.4-1
libgcc - 8.4.0-11
libgcrypt - 1.8.7-2
libgd-full - 2.3.1-1
libgmp - 6.2.1-1a
libgnutls - 3.7.0-2
libgpg-error - 1.39-2
libiconv-full - 1.16-1
libintl-full - 0.21-1
libjpeg-turbo - 2.0.6-1
libjson-c - 0.15-1
libksba - 1.5.0-1
liblua - 5.1.5-8
liblua5.3 - 5.3.5-4
liblzma - 5.2.5-3
libmbedtls - 2.16.9-1
libmount - 2.36.1-2
libncurses - 6.2-1
libncursesw - 6.2-1
libndm - 1.1.15-1
libnettle - 3.6-1
libnpth - 1.6-1
libopenssl - 1.1.1k-1
libopenssl-conf - 1.1.1k-1
libpcre - 8.44-4
libpcre2 - 10.36-1
libpng - 1.6.37-10
libpopt - 1.16-2
libpthread - 2.27-11
libreadline - 8.1-1
librt - 2.27-11
libslang2 - 2.3.2-4
libsqlite3 - 3330000-1
libssh2 - 1.9.0-2
libssp - 8.4.0-11
libstdcpp - 8.4.0-11
libtiff - 4.2.0-1
libubox - 2020-12-12-35787769-1
libuuid - 2.36.1-2
libwebp - 1.2.0-1
libxml2 - 2.9.10-3
libzip-gnutls - 1.7.3-1
locales - 2.27-9
logrotate - 3.17.0-1
mariadb-client - 10.4.17-1
mariadb-client-base - 10.4.17-1
mariadb-client-extra - 10.4.17-1
mariadb-common - 1.0-2
mariadb-server - 10.4.17-1
mariadb-server-base - 10.4.17-1
mariadb-server-extra - 10.4.17-1
mariadb-server-plugin-locales - 10.4.17-1
mc - 4.8.26-1b
msmtp - 1.8.14-1
ncdc - 1.22.1-1
ndmq - 1.0.2-7
nginx-ssl - 1.19.6-1a
oniguruma - 6.9.6-1
openssl-util - 1.1.1k-1
opkg - 2020-12-24-9bbc7eae-1
opt-ndmsv2 - 1.0-13
php7 - 7.4.15-1
php7-cli - 7.4.15-1
php7-fpm - 7.4.15-1
php7-mod-bcmath - 7.4.15-1
php7-mod-calendar - 7.4.15-1
php7-mod-ctype - 7.4.15-1
php7-mod-curl - 7.4.15-1
php7-mod-filter - 7.4.15-1
php7-mod-ftp - 7.4.15-1
php7-mod-gd - 7.4.15-1
php7-mod-iconv - 7.4.15-1
php7-mod-json - 7.4.15-1
php7-mod-mbstring - 7.4.15-1
php7-mod-mysqli - 7.4.15-1
php7-mod-mysqlnd - 7.4.15-1
php7-mod-openssl - 7.4.15-1
php7-mod-pdo - 7.4.15-1
php7-mod-pdo-mysql - 7.4.15-1
php7-mod-session - 7.4.15-1
php7-mod-sockets - 7.4.15-1
php7-mod-sqlite3 - 7.4.15-1
php7-mod-tokenizer - 7.4.15-1
php7-mod-xml - 7.4.15-1
php7-mod-zip - 7.4.15-1
poorbox - 1.33.0-2
ptokax - 0.5.2.2-2
resolveip - 2
tar - 1.32-3
terminfo - 6.2-1
xz - 5.2.5-3
xz-utils - 5.2.5-3
zlib - 1.2.11-3
zoneinfo-asia - 2021a-1
zoneinfo-europe - 2021a-1

 

 

Share this post


Link to post
Share on other sites

получил другую ошибку.

gpg: agent_genkey failed: No pinentry
Key generation failed: No pinentry

нужен пакет pinentry. поставим. странно что он не указан как зависимый.

Share this post


Link to post
Share on other sites

ну что застрял. как решить?

~ # echo -e "Subject: Проверка почты\r\n\r\nЭто тестовое письмо" |msmtp --debug --from=default -t meccep45@888.88
loaded system configuration file /opt/etc/msmtprc
loaded user configuration file /opt/root/.msmtprc
falling back to default account
gpg: decryption failed: No secret key
msmtp: cannot read output of 'gpg2 --no-tty -q -d ~/.msmtp-password.gpg'

читал про переменную GPG_TTY куда её применить не знаю.

Share this post


Link to post
Share on other sites
Скрытый текст

# Example for a system wide configuration file

# A system wide configuration file is optional.
# If it exists, it usually defines a default account.
# This allows msmtp to be used like /usr/sbin/sendmail.
account default

# The SMTP smarthost
host smtp.gmail.com

# Use TLS on port 465
port 587
tls on
tls_starttls on

# Construct envelope-from addresses of the form "user@oursite.example"
auth login
user meccep45@888.88
passwordeval gpg2 --no-tty -q -d ~/.msmtp-password.gpg
from meccep45@888.88

# Syslog logging with facility LOG_MAIL instead of the default LOG_USER
syslog LOG_MAIL 

 

passwordeval gpg2 --no-tty -q -d ~/.msmtp-password.gpg отдельно эта срока открывает в терминале окно ввода секретного ключа.понять понимаю, реализовать не могу. эх

Share this post


Link to post
Share on other sites
ln -sf /opt/bin/gpg2 /opt/bin/gpg
ln -sf /opt/bin/gpgv2 /opt/bin/gpgv

В OpenWrt используют ALTERNATIVES, в Entware - нет. ALTERNATIVES - суть postinst создание симлинкков, в соответствии с заданными параметрами (приоритет, путь), используются как для замены апплетов busybox`a на полноценные утилиты, так и в отдельных пакетах.

Edited by TheBB
add

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...