錯誤 — gpg:無法開啟'/dev/tty':沒有這類裝置或位址 — 使用PGP金鑰加密/解密時
若要在使用PGP金鑰加密或解密時修正錯誤"gpg: cannot open '/dev/tty': No such device or address",請在GPG命令中新增--no-tty,略過系統嘗試輸出到/dev/tty的步驟。
說明 description
環境
- Campaign Classic
- Campaign
- Campaign Standard
問題/症狀
使用encrypt post-process命令或decrypt pre-process命令時出現以下錯誤。
gpg: cannot open '/dev/tty': No such device or address
解析度 resolution
若要修復上述錯誤,您需要略過系統嘗試輸出到 /dev/tty 的步驟,這在檔案系統中不存在或 neolane 使用者無權存取此目錄。在 GPG 命令中,新增 --no-tty 以跳過此步驟。例如:
<etl>
<preProcessCommand command="gpg --decrypt --no-tty --recipient <b></b><b></b> "$fileName"" label="Decryption GPG" name="GPGdecrypt"/>
<postProcessCommand command="gpg --encrypt --no-tty --recipient <b></b><b>* "$fileName"" label="Encryption GPG" name="GPGencrypt" suffix="gpg"/>
</etl>
原因
發生此錯誤是因為系統嘗試輸出到/dev/tty,這在檔案系統中不存在或者neolane使用者無權存取此目錄。
另外,檢查密碼是否存在 preProcessCommand 中。如果缺少密碼短語,我們也會收到此錯誤。
<etl>
<preProcessCommand name="GPGdecrypt" label ="Decryption GPG" command="gpg --decrypt --passphrase passphrase --recipient CampaignOperations@adobe.com "$fileName""/>
<postProcessCommand name="GPGencrypt" label ="Encryption GPG" command="gpg --encrypt --recipient comp_ops@xxx.com.au "$fileName"" suffix="gpg"/>
</etl>
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f