2015-03-03 191 views
0

雖然我手動使用gpg,但它工作正常。我得到屏幕下方(「密碼解鎖」)我不想這個屏幕意味着我想自動化意味着我想在解密時提供密碼。在GPG中解密時提供密碼

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk 
x Please enter the passphrase to unlock the secret key for the OpenPGP certificate: x 
x "akhilesh (ak) <[email protected]>"            x 
x 2048-bit RSA key, ID EC0BCE3F,              x 
x created 2015-03-02 (main key ID 3FA59C97).           x 
x                     x 
x                     x 
x Passphrase _______________________________________________________________________ x 
x                     x 
x   <OK>             <Cancel>   x 
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj 
+2

可能重複傳遞](http://stackoverflow.com/questions/28482012/gpg-automatic-decryption-password-passing) – 2015-03-03 09:24:20

+0

刪除代碼塊中的空間以查看整個消息而不需要滾動 – 2015-03-06 16:58:35

+0

答案應該是使用gpg代理 - 作爲提出的重複問題的答案建議。 – marbu 2015-03-06 17:35:32

回答

0

要指定在解密時的口令,使用標誌--passphrase <your passphrase>--batch(需要用於gpg2批)

實施例:

gpg2 --batch --passphrase mypassphrase -a -d my_encrypted_file 
[GPG自動解密密碼的