介绍

在发布之前,您需要在https://svn.apache.org/repos/asf/maven/project/KEYS中添加 GPG 密钥。这里有一些有用的GnuPG命令来生成你的密钥。

gpg --gen-key

>gpg --gen-key
gpg (GnuPG) 1.4.5; Copyright (C) 2006 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

gpg: keyring `C:/Documents and Settings/Siveton Vincent/Application Data/gnupg\secring.gpg'
created
gpg: keyring `C:/Documents and Settings/Siveton Vincent/Application Data/gnupg\pubring.gpg'
created
Please select what kind of key you want:
   (1) DSA and Elgamal (default)
   (2) DSA (sign only)
   (5) RSA (sign only)
Your selection? 1
DSA keypair will have 1024 bits.
ELG-E keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 2048
Requested keysize is 2048 bits
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 0
Key does not expire at all
Is this correct? (y/N) y

You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
    "Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"

Real name: Vincent Siveton
Email address: vsiveton@apache.org
Comment:
You selected this USER-ID:
    "Vincent Siveton <vsiveton@apache.org>"

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.

You don't want a passphrase - this is probably a *bad* idea!
I will do it anyway.  You can change your passphrase at any time,
using this program with the option "--edit-key".

We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
++++++++++++++++++++.++++++++++..+++++++++++++++++++++++++++++++++++++++++++++++
+++.+++++++++++++++.++++++++++++++++++++..+++++++++++++++>++++++++++............
.........................+++++
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
.+++++++++++++++..++++++++++++++++++++....+++++.++++++++++.++++++++++.++++++++++
+++++.+++++++++++++++++++++++++++++++++++.+++++.++++++++++++++++++++++++++++++>+
+++++++++>+++++>+++++......................................................>++++
+......<.+++++........................+++++^^^
gpg: C:/Documents and Settings/Siveton Vincent/Application Data/gnupg\trustdb.gpg: trustdb
created
gpg: key 07DDB702 marked as ultimately trusted
public and secret key created and signed.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
pub   1024D/07DDB702 2006-10-10
      Key fingerprint = 71F6 F555 8A61 71C4 330D  B868 84F4 D470 07DD B702
uid                  Vincent Siveton <vsiveton@apache.org>
sub   2048g/D2814A59 2006-10-10

gpg --list-sigs

>gpg --list-sigs "Vincent Siveton" && gpg --armor --export "Vincent Siveton"
pub   1024D/07DDB702 2006-10-10
uid                  Vincent Siveton <vsiveton@apache.org>
sig 3        07DDB702 2006-10-10  Vincent Siveton <vsiveton@apache.org>
sub   2048g/D2814A59 2006-10-10
sig          07DDB702 2006-10-10  Vincent Siveton <vsiveton@apache.org>

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (MingW32)

mQGiBEUrnAsRBACQDiYGc1IQmkENLO9iznBg8otGPEbzqQozT5tsip5mB30f6Mc/
uuLxJkLdna7Ul3goIXDtCeLJq38gHvruNtVNR6S+juJFkd5sLEH8UJ18PbKuo/9I
KGlzjtCYUUDC48czRr0efhqd54NH8ydNdpaZ76NGPPYfpXtk7kKgH/nPiwCgxozK
IG2frMuWIvdFafbqdAl7y/sD/1Csf0r9jtHEeXOuyhm8jCGrSwzLbHUGKPUQP37P
ajECHoWp6HnvHEEEpgVl+UjfZvrcVhzUoP+3r5HAugqERfkzK8AWc7qjIRjf64kU
sjvto31G2KYz17Y8K9y4LkRkUspu8uw903pKnW/QELg4vvPVaEYpV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UvHPiuKdT4aviEkEGBECAAkFAkUrnBgCGwwA
CgkQhPTUcAfdtwJL9ACgmLuDxE+oZaMhyFSmXWN0fM36Bd8AoLYrvwydB9+nNnhJ
85TjkMPTgjp9
=Hg4C
-----END PGP PUBLIC KEY BLOCK-----

您需要将此结果附加到https://svn.apache.org/repos/asf/maven/project/KEYS

您还需要将您的密钥上传到公共服务器:http ://pgp.mit.edu/,方法是复制您在文本字段中附加的密钥并提交。您可以通过在关键搜索引擎中搜索您的电子邮件来确保。

gpg --指纹

>gpg --fingerprint vsiveton
pub   1024D/07DDB702 2006-10-10     
      Key fingerprint = 0000 0000 0000 0000 0000  0000 0000 0000 0000 0000
uid                  Vincent Siveton <vsiveton@apache.org>
sub   2048g/D2814A59 2006-10-10

转到https://id.apache.org,登录并​​填写OpenPGP Public Key Primary Fingerprint:的值Key fingerprint

您可以阅读有关校验和和签名以及如何使用 Maven 生成 PGP 签名的更多信息