Skip to content

Commit

Permalink
How to import a key into your keyring
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Apr 24, 2024
1 parent d6cd240 commit b81481b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README-typetools.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ phrase: Unauthorized (401)". If version 3.2.1 is being used, change
"gpg:sign-and-deploy-file" to
"org.apache.maven.plugins:maven-gpg-plugin:3.1.0:sign-and-deploy-file".

TODO: Try replacing "-Dgpg.passphrase=..." by
```
export MAVEN_GPG_PASSPHRASE="$(cat $HOSTING_INFO_DIR/release-private.password)"
```

```
PACKAGE=guava-33.1.0-jre
Expand All @@ -182,6 +187,12 @@ else
exit
fi
## These commands only need be run once ever.
# gpg --import ${HOSTING_INFO_DIR}/private-key.pgp
# gpg --import ${HOSTING_INFO_DIR}/public-key.pgp
[ ! -z "$PACKAGE" ] && \
../mvnw gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=cfMavenCentral.xml -Dgpg.publicKeyring=$HOSTING_INFO_DIR/pubring.gpg -Dgpg.secretKeyring=$HOSTING_INFO_DIR/secring.gpg -Dgpg.keyname=ADF4D638 -Dgpg.passphrase="`cat $HOSTING_INFO_DIR/release-private.password`" -Dfile=target/${PACKAGE}.jar \
&& \
Expand All @@ -190,6 +201,8 @@ fi
../mvnw gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=cfMavenCentral.xml -Dgpg.publicKeyring=$HOSTING_INFO_DIR/pubring.gpg -Dgpg.secretKeyring=$HOSTING_INFO_DIR/secring.gpg -Dgpg.keyname=ADF4D638 -Dgpg.passphrase="`cat $HOSTING_INFO_DIR/release-private.password`" -Dfile=target/site/apidocs/${PACKAGE}-javadoc.jar -Dclassifier=javadoc
```

`-Dgpg.keyname` is the last 8 characters of the fingerprint printed by `gpg --list-secret-keys`.

9. Complete the release at https://oss.sonatype.org/#stagingRepositories


Expand Down

0 comments on commit b81481b

Please sign in to comment.