我创建了一个压缩的tar文件,abc.gz。我想要密码保护的abc.gz文件,我曾经使用GPG在过去,但它现在不适用于我。我不明白为什么它要求一个用户id和空行。我有正确的语法吗?我使用的是Linux 32位操作系统
gpg命令:
$ gpg -e abc.gz
You did not specify a user ID. (you may use "-r")
Current recipients:
Enter the user ID. End with an empty line:
我用脚本对一些备份文件进行了批量加密。操作系统为CentOS 7,当前版本的gpg为2.0.22。脚本的重要部分是:
enter code here`echo Enter passphrase
read PASS
for sourcefile in $(find /quitelarge/upload/proton/ -name *.gz); do
echo $sourcefile
destfile=$(echo $sourcefile | sed '1 s;/quitelarge/upload/proton;/quitelarge/upload/mega;')
我无法在linux中生成GPG密钥
sudo gpg --gen-key # This is the command to try to generate key
错误
You need a Passphrase to protect your secret key.
gpg: problem with the agent: Timeout
gpg: Key generation canceled.
请告诉我哪里做错了
我忘了我的GPG密钥密码。
我知道我的计算机正在存储它,因为我用它解密字符串,而没有密码,例如:
$ gpg --decrypt -r me@example.com ~/.password-store/gmail.gpg
You need a passphrase to unlock the secret key for
user: "Example <me@example.com>"
2048-bit RSA key, ID 02BFF027, created 2014-10-04 (main key ID 410A4C4A)
gpg: NOTE: secret
我正在使用Gnupg解密一个文件:
gpg --decrypt -o file.xml file.gpg
You need a passphrase to unlock the secret key for
user: "TEST-COMPANY (DAM Key) <test@test.de>"
4096-bit RSA key, ID 257C2D21, created 2018-04-23
Enter passphrase:
然后我编写这个密码短语,然后就可以工作了。
现在,我想在PHP上使用以下命令使其自动执行:
$command = 'gpg