carlolars / gnupg2-msys2 Goto Github PK
View Code? Open in Web Editor NEWHow to use GnuPG2 in MSYS2, with SSH authentication using keys from a SmartCard (YubiKey)
License: MIT License
How to use GnuPG2 in MSYS2, with SSH authentication using keys from a SmartCard (YubiKey)
License: MIT License
Hello,
I am trying to suppress passphrase prompt completely as we are looking for a fully automated unattended decryption program. I am using Task Scheduler to run the below command
echo mypassphrase|gpg --logger-file "D:\FileShare\PGPScripts\SFTP\gpglog.log" --pinentry-mode loopback --batch --yes --passphrase-fd 0 --decrypt-files "D:\FileShare\WIP*.pgp"
After the system goes idle the decryption starts failing with the error "Bad Passphrase/ Secret key available". After running a manual decryption, the job continues to run successfully.
What should I do to get rid of this problem?
Are the below options going to be helpful in my case?
add pinentry-mode loopback to %APPDATA%\gnupg\gpg.conf;
then run gpgconf --kill gpg-agent ;
Hello! Your post is working like charm, only one common issue that happens to all platforms: pinentry GUI will pop up when any private key authentication is needed.
PATH is automatically configured by GPG4Win, appending C:\Program Files (x86)\Gpg4win\..\GnuPG\bin
. As many other pages, like this one suggest pinentry-(curses|tty)
which both packages don't exist in mingw pacman package repo.
I found this page exactly what I'm trying to solve now and I tried what he did too, this post has no answer yet. I tried to create and modify %APPDATA%\gnupg\gpg-agent.conf
and added pinentry-program "c:/Program Files (x86)/GnuPG/bin/pinentry-basic.exe"
(note the paired double quotes). On the contrary to what was mentioned on the page, I could call pinentry-basic
, though it's also a pop-up:
... which is actually different from what GPG4win
has to offer:
Solution found in the end:
allow-loopback-pinentry
is the default option for gpg-agent
, simply add pinentry-mode loopback
to %APPDATA%\gnupg\gpg.conf
then run gpgconf --kill gpg-agent ; gpg-connect-agent /bye
in PowerShell will do the trick.
I'm keeping the exploration process here as a reference, thanks again!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.