Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create pgp file with gpg from command line

I want to encrypt an xml file and I am using gpg4win (kleopatra). Using the kleopatra interface I set an option to produce files with extension pgp instead of gpg which is the default extension.

I am trying to create a pgp file from command line using the command

gpg -r [email protected] -se C:\temp\myfile.xml

because I need to submit it in a web app that accepts pgp only. I have tried to put some other options in the command but I always get a gpg file. How can I produce a pgp file from command line?

like image 221
mike_x_ Avatar asked Apr 20 '16 06:04

mike_x_


1 Answers

This may not be the same process as others, but this worked for me:

gpg --batch --yes --recipient "user" --output "fulldirectory\filename.txt.pgp" --encrypt "fulldirectory\filename.txt"
like image 159
Nick Avatar answered Sep 30 '22 13:09

Nick