GPG encryption/decryption commands are not working in a shell script Unicorn Meta Zoo #1: Why...
Map material from china not allowed to leave the country
What is the ongoing value of the Kanban board to the developers as opposed to management
Could moose/elk survive in the Amazon forest?
Economise space with floats
Multiple fireplaces in an apartment building?
How to count in linear time worst-case?
Seek and ye shall find
What is /etc/mtab in Linux?
Why does the Cisco show run command not show the full version, while the show version command does?
How to translate "red flag" into Spanish?
Is this homebrew racial feat, Stonehide, balanced?
How to use @AuraEnabled base class method in Lightning Component?
Check if a string is entirely made of the same substring
My bank got bought out, am I now going to have to start filing tax returns in a different state?
How to keep bees out of canned beverages?
The art of proof summarizing. Are there known rules, or is it a purely common sense matter?
Visa-free travel to the US using refugee travel document from Spain?
Are all CP/M-80 implementations binary compatible?
"Rubric" as meaning "signature" or "personal mark" -- is this accepted usage?
What is the best way to deal with NPC-NPC combat?
How to avoid introduction cliches
"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
Can you stand up from being prone using Skirmisher outside of your turn?
GPG encryption/decryption commands are not working in a shell script
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraWhat are commands to find shell keywords, built in functions and user defined functions?Is there a way to revoke a GPG encryption key?Set up gpg to decrypt own local files without supplying passphrasepgp decryption of file encrypted from named pipe as input does not decrypt to execution directoryAccess to line arguments in shell scriptDuplicity encryptiongpg does not ask for passphrase on one encrypted fileDo I have to decrypt a signed and encypted file twice to get the actual data file?ecryptfs - Encrypting identical files with the same key leads to different resultsFind command script, gpg decryption, and proper shell path
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
As part of a shell script, I need to encrypt and decrypt files. From the command line my commands are working and files are getting encrypted/decrypted, but the same commands are not working from a shell script.
Used commands are:
echo "PASSPHRASE" | gpg --passphrase-fd 0 --always-trust -r INFRA --encrypt filename.sh
echo "PASSPHRASE" | gpg --passphrase-fd 0 --always-trust -r INFRA filename.sh.gpg
linux bash shell encryption
New contributor
add a comment |
As part of a shell script, I need to encrypt and decrypt files. From the command line my commands are working and files are getting encrypted/decrypted, but the same commands are not working from a shell script.
Used commands are:
echo "PASSPHRASE" | gpg --passphrase-fd 0 --always-trust -r INFRA --encrypt filename.sh
echo "PASSPHRASE" | gpg --passphrase-fd 0 --always-trust -r INFRA filename.sh.gpg
linux bash shell encryption
New contributor
unix.stackexchange.com/questions/60213/… this question suggests adding --batch
– David K
3 hours ago
add a comment |
As part of a shell script, I need to encrypt and decrypt files. From the command line my commands are working and files are getting encrypted/decrypted, but the same commands are not working from a shell script.
Used commands are:
echo "PASSPHRASE" | gpg --passphrase-fd 0 --always-trust -r INFRA --encrypt filename.sh
echo "PASSPHRASE" | gpg --passphrase-fd 0 --always-trust -r INFRA filename.sh.gpg
linux bash shell encryption
New contributor
As part of a shell script, I need to encrypt and decrypt files. From the command line my commands are working and files are getting encrypted/decrypted, but the same commands are not working from a shell script.
Used commands are:
echo "PASSPHRASE" | gpg --passphrase-fd 0 --always-trust -r INFRA --encrypt filename.sh
echo "PASSPHRASE" | gpg --passphrase-fd 0 --always-trust -r INFRA filename.sh.gpg
linux bash shell encryption
linux bash shell encryption
New contributor
New contributor
edited 5 hours ago
Worthwelle
2,85931325
2,85931325
New contributor
asked 13 hours ago
Naveen RohithNaveen Rohith
1
1
New contributor
New contributor
unix.stackexchange.com/questions/60213/… this question suggests adding --batch
– David K
3 hours ago
add a comment |
unix.stackexchange.com/questions/60213/… this question suggests adding --batch
– David K
3 hours ago
unix.stackexchange.com/questions/60213/… this question suggests adding --batch
– David K
3 hours ago
unix.stackexchange.com/questions/60213/… this question suggests adding --batch
– David K
3 hours ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Naveen Rohith is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1429046%2fgpg-encryption-decryption-commands-are-not-working-in-a-shell-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Naveen Rohith is a new contributor. Be nice, and check out our Code of Conduct.
Naveen Rohith is a new contributor. Be nice, and check out our Code of Conduct.
Naveen Rohith is a new contributor. Be nice, and check out our Code of Conduct.
Naveen Rohith is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1429046%2fgpg-encryption-decryption-commands-are-not-working-in-a-shell-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
unix.stackexchange.com/questions/60213/… this question suggests adding --batch
– David K
3 hours ago