Quantcast
RSS Entries RSS
RSS Subscribe by Email

Creating .asc signature files with GPG

First make sure you don’t have a key already:

gpg --list-keys

If you didn’t and need to create a key then run:

gpg --gen-key

It might hang for awhile while generating enough random entropy. Run “ls -R /” to speed things up.

And upload it to a public key server:

gpg --keyserver hkp://pgp.mit.edu --send-keys <keyid>

Now list the keys again to get the keyid:

gpg --list-keys

The keyid is the half after the / in:

pub   XXXX/XXXXXXXX 2011-12-05

Then generate your key:

gpg -ab <filename>

If you’re doing this for an upload to the Maven repositories, you’ll need to do this for each of the four file (.jar, -sources.jar, -javadoc.jar, and .pom) and then jar all eight files together in a bundle.jar file.  More details available on Maven’s how to generate PGP signatures page.

2 Comments »

  1. Chris said,

    December 30, 2010 at 7:46 am

    Also on the same topic: http://www.math.utah.edu/~beebe/PGP-notes.html

    On another note: I’m wondering how many people actually use .asc signatures? Maybe someone has more insight on this.

    Awhile back even Outlook was unable to correctly handle .asc attachments. I don’t use Outlook myself, so I don’t know if this is still a problem.

  2. Ben said,

    February 19, 2011 at 9:45 pm

    Hey Chris, I had to create an .asc to upload to the Maven repository, which is the only thing I’ve ever used it for.

RSS feed for comments on this post · TrackBack URL

Leave a Comment