You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/products/sdks/overview/java/publishing-to-maven-central.mdx
+21-15Lines changed: 21 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,29 +116,32 @@ groups:
116
116
repository: your-org/company-java
117
117
```
118
118
</Step>
119
+
</Steps>
119
120
120
-
<Step title="Generate GPG Signature">
121
+
## Generate GPG Signature
121
122
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.
123
124
124
125
<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:
128
129
129
130
```sh
130
131
gpg --list-secret-keys --keyid-format LONG
131
132
```
132
133
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:
134
135
135
136
```sh
136
137
gpg --gen-key
137
138
```
138
139
139
140
You'll be prompted to create a new username and passphrase.
141
+
</Step>
142
+
<Step title="Export your key">
140
143
141
-
1. To export your secret key, run:
144
+
Export your key so you can store it in an environment variable later on:
142
145
143
146
```sh
144
147
gpg --export-secret-keys --armor YOUR_KEY_ID
@@ -147,14 +150,6 @@ groups:
147
150
Be sure to replace `YOUR_KEY_ID` with the key ID of the key you want to export.
148
151
149
152
<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:
0 commit comments