LoginSignup
15
11

More than 5 years have passed since last update.

gpgでパスフレーズを聞かれずにファイルを復号化する方法

Posted at

バッチファイルなどからgpgを使うには

簡単で、以下の通りのコマンドでOK

echo 【復号化パスフレーズ】| gpg --passphrase-fd 0 --decrypt --batch --no-secmem-warning 【復号化したいgpgファイル】

「--passphrase-fd 0」と「--batch」オプションを用いて、標準出力でパスフレーズを渡す方法でとっても簡単です。

なお、「--no-secmem-warning」は「gpg: Warning: using insecure memory!」のエラーが出ないようにするおまじないです。

15
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
11