{"id":22808651,"url":"https://github.com/sixarm/gpg-decrypt","last_synced_at":"2025-04-22T13:15:11.431Z","repository":{"id":137270334,"uuid":"55658471","full_name":"SixArm/gpg-decrypt","owner":"SixArm","description":"Use GPG to decrypt a file using our best settings","archived":false,"fork":false,"pushed_at":"2025-04-14T08:44:15.000Z","size":63,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T13:14:49.029Z","etag":null,"topics":["encryption","gpg","script","shell","unix"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SixArm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-07T02:53:05.000Z","updated_at":"2025-04-14T08:44:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca7f7362-a3eb-470d-a839-0f8f0846d6c8","html_url":"https://github.com/SixArm/gpg-decrypt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fgpg-decrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fgpg-decrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fgpg-decrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fgpg-decrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SixArm","download_url":"https://codeload.github.com/SixArm/gpg-decrypt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250246727,"owners_count":21398919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encryption","gpg","script","shell","unix"],"created_at":"2024-12-12T11:11:06.463Z","updated_at":"2025-04-22T13:15:11.424Z","avatar_url":"https://github.com/SixArm.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpg-decrypt:\u003cbr\u003edecrypt a file using our best settings\n\n\u003cimg src=\"README.png\" alt=\"GnuPG\" width=\"450\" height=\"153\"/\u003e\n\nSyntax:\n\n    gpg-decrypt \u003cfile\u003e\n    \nExample:\n\n    $ gpg-decrypt example.txt.gpg \u003e example.txt\n\nOutput is a new decrypted file:\n\n    example.txt\n\n\n## Settings\n\nTo get our settings, we use these gpg options:\n\n  * `--quiet`: Try to be as quiet as possible.\n  * `--no-greeting`: Suppress the initial copyright message but do not enter batch mode.\n\nIf you are on an older system, then you may want to add this:\n\n  * `--no-use-agent`: Do not use a system agent such as Ubuntu's gnome-keyring process.\n\n  * `--pinentry-mode=loopback`: Use the terminal for PIN encry.\n\n\n## More examples\n\n\nTo decrypt a file:\n\n    $ gpg-decrypt foo.gpg\n\nTo decrypt a file to a specific output file name:\n\n    $ gpg-decrypt foo.gpg --output goo\n\nTo decrypt a directory:\n\n    $ gpg-dncrypt foo.tar.gpg | tar -x\n\nTo decrypt a file then delete it:\n\n    $ gpg-decrypt foo.gpg \u0026\u0026 rm foo.gpg\n\nTo decrypt a directory then delete it:\n\n    $ gpg-dncrypt foo.tar.gpg | tar -x \u0026\u0026 rm foo.tar.gpg\n\n\n## Advice\n\nWe tend to use these naming conventions:\n\n  * GPG file name extension `.gpg`.\n  * tar file extension `.tar`.\n\nWe tend to skip compression:\n\n  * We tend to use `gpg` without using compression.\n  * We tend to use `tar` without using compression.\n\n\n## Command\n\nThe command is:\n\n    gpg \\\n    --decrypt \\\n    --quiet \\\n    --no-greeting \\\n    --pinentry-mode=loopback \\\n    \"$@\"\n\n\n## Troubleshooting\n\n\n### TTY\n\nIf you get error messages like this:\n\n    gpg: Inappropriate ioctl for device\n    gpg: problem with the agent: Inappropriate ioctl for device\n    gpg: error creating passphrase: Operation cancelled\n    gpg: symmetric encryption of `[stdin]' failed: Operation cancelled\n\nThen try this:\n\n    $ export GPG_TTY=$(tty)\n\n\n### Restart\n\nIf you get error message like this:\n\n    gpg: WARNING: server 'gpg-agent' is older than us (2.2.6 \u003c 2.2.7)\n    gpg: Note: Outdated servers may lack important security fixes.\n    gpg: Note: Use the command \"gpgconf --kill all\" to restart them.\n    gpg: signal Interrupt caught ... exiting\n\nThen try this:\n\n    $ gpgconf --kill all\n\n\n\n## See also\n \nThese commands are similar:\n\n  * [`gpg-encrypt`](https://github.com/SixArm/gpg-encrypt): \n    use GPG to encrypt a file using our best settings.\n  \n  * [`gpg-decrypt`](https://github.com/SixArm/gpg-decrypt): \n    use GPG to decrypt a file using our best settings.\n\n  * [`openssl-encrypt`](https://github.com/SixArm/openssl-encrypt): \n    use OpenSLL to encrypt a file using our best settings.\n  \n  * [`openssl-decrypt`](https://github.com/SixArm/openssl-decrypt): \n    use OpenSSL to decrypt a file using our best settings.\n \n \n## Tracking\n\n  * Command: gpg-decrypt\n  * Website: https://sixarm.com/gpg-decrypt\n  * Cloning: https://github.com/sixarm/gpg-decrypt\n  * Version: 4.0.0\n  * Created: 2010-05-20\n  * Updated: 2018-11-01\n  * License: GPL\n  * Contact: Joel Parker Henderson (joel@joelparkerhenderson.com)\n  * Tracker: 15aff3e7c5a9635607f085773eee0238\n\n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Fgpg-decrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsixarm%2Fgpg-decrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Fgpg-decrypt/lists"}