Please, fix batch mode for gpg --edit-key-trust

John Buehrer john at zuri.ch
Wed Jul 27 15:46:19 CEST 2016


Using gpg 2.1.1 with Ubuntu 16.04, this fails:


    $ printf "5\n" | gpg2 --batch --edit-key 67A92459607354C7 trust quit
    ...
    Please decide how far you trust this user to correctly verify other users' keys
    (by looking at passports, checking fingerprints from different sources, etc.)

      1 = I don't know or won't say
      2 = I do NOT trust
      3 = I trust marginally
      4 = I trust fully
      5 = I trust ultimately
      m = back to the main menu

    *gpg: Sorry, we are in batchmode - can't get input*


Why doesn't this work?
Or rather, can this be made to work?

I'm surprised anything GNU doesn't automatically read input from a redirected STDIN,
that's Unix 101.

Searching the archives, I see a number of complicated scripting work-arounds.
Maybe I missed the insight somewhere why this simply doesn't "just work" ?

Thanks
John





More information about the Gnupg-users mailing list