Skip to content

Commit a285a00

Browse files
committed
add gpg info to maven central publishing page
1 parent 2ac0f5f commit a285a00

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

fern/products/sdks/overview/java/publishing-to-maven-central.mdx

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -116,29 +116,32 @@ groups:
116116
repository: your-org/company-java
117117
```
118118
</Step>
119+
</Steps>
119120

120-
<Step title="Generate GPG Signature">
121+
## Generate GPG Signature
121122

122-
Next, set up code signing credentials by generating or identifying a GPG key ID, password, and secret key. Maven Central requires all artifacts to be digitally signed with PGP/GPG keys.
123+
Next, set up code signing credentials by generating or identifying a GPG key ID, password, and secret key. Maven Central requires all artifacts to be digitally signed with PGP/GPG keys.
123124

124125
<Info>If you don't have gpg installed, you can download the binary from [https://gnupg.org/download/index.html](https://gnupg.org/download/index.html), or install it via package manager.</Info>
125-
126-
1. Find your key
127-
* If you already have a GPG key, you can list your keys:
126+
<Steps>
127+
<Step title="Find your key">
128+
If you already have a GPG key, you can list your keys:
128129

129130
```sh
130131
gpg --list-secret-keys --keyid-format LONG
131132
```
132133

133-
* If you don't have a GPG key, you can generate a new one:
134+
If you don't have a GPG key, you can generate a new one:
134135

135136
```sh
136137
gpg --gen-key
137138
```
138139

139140
You'll be prompted to create a new username and passphrase.
141+
</Step>
142+
<Step title="Export your key">
140143

141-
1. To export your secret key, run:
144+
Export your key so you can store it in an environment variable later on:
142145

143146
```sh
144147
gpg --export-secret-keys --armor YOUR_KEY_ID
@@ -147,14 +150,6 @@ groups:
147150
Be sure to replace `YOUR_KEY_ID` with the key ID of the key you want to export.
148151

149152
<Info>More information is available on [Maven Central's GPG validation page](https://central.sonatype.org/publish/requirements/gpg/).</Info>
150-
1. Finally, upload your key to public key servers so Maven Central can access the signature:
151-
152-
```bash
153-
# Upload to multiple key servers
154-
gpg --keyserver keyserver.ubuntu.com --send-keys YOUR_KEY_ID
155-
gpg --keyserver keys.openpgp.org --send-keys YOUR_KEY_ID
156-
gpg --keyserver pgp.mit.edu --send-keys YOUR_KEY_ID
157-
```
158153
</Step>
159154
<Step title="Configure GPG Signature">
160155

@@ -179,6 +174,17 @@ groups:
179174
repository: your-org/company-java
180175
```
181176
</Step>
177+
<Step title="Upload your key to public key servers">
178+
179+
Finally, upload your key to public key servers so Maven Central can access the signature:
180+
181+
```bash
182+
# Upload to multiple key servers
183+
gpg --keyserver keyserver.ubuntu.com --send-keys YOUR_KEY_ID
184+
gpg --keyserver keys.openpgp.org --send-keys YOUR_KEY_ID
185+
gpg --keyserver pgp.mit.edu --send-keys YOUR_KEY_ID
186+
```
187+
</Step>
182188
</Steps>
183189

184190
## Release your SDK to Maven Central

0 commit comments

Comments
 (0)