@@ -142,23 +142,20 @@ The released binaries are signed with GPG. If you want to verify that the releas
142
142
` ` ` bash
143
143
144
144
# # Optional, you can get and trust the owner GPG key
145
- # this is the repo owner key:
146
- _KEY=" F3702E3FAD8F76DC"
147
- # You can get it with this command:
148
- _KEY=$( curl -s https://api.github.com/users/metal3d/gpg_keys | \
149
- awk -F' "' ' /"key_id"/{print $4; exit}' )
150
- echo ${_KEY}
151
-
152
- # you can import the repository owner key from keyserver
153
- gpg --keyserver hkps://keys.openpgp.org/ --recv-keys ${_KEY}
154
-
155
- # optoinal, trust owner key
156
- _FPR=$( gpg -k --with-colons --fingerprint " ${_KEY} " | awk -F: ' /fpr/{print $10; exit}' )
157
- echo ${_FPR} :6: | gpg --import-ownertrust
158
- unset _KEY _FPR
159
-
160
- # # Verification
161
- # get the signature of the right binary
145
+ # import the key from github
146
+ # install jq before (apt install -y jq, dnf install -y jq, ...)
147
+ gpg --import <( curl -s https://api.github.com/users/metal3d/gpg_keys | jq -r ' .[0].raw_key' )
148
+
149
+ # or use keyserver
150
+ _KEY=" 483493B2DD0845DA8F21A26DF3702E3FAD8F76DC"
151
+ gpg --keyserver hkps://keys.openpgp.org/ --recv-keys ${_KEY~15}
152
+
153
+ # # optional, trust owner key
154
+ _KEY=" 483493B2DD0845DA8F21A26DF3702E3FAD8F76DC"
155
+ echo ${_KEY} :6: | gpg --import-ownertrust
156
+
157
+ # # Binary signature verification
158
+ # get the signature file (.asc) of the right binary
162
159
_REL=" goreorder-linux-amd64"
163
160
_SIGNURL=https://github.com/metal3d/goreorder/releases/download/${_REL} .asc
164
161
curl ${_SIGNURL} -o /tmp/goreorder.asc
0 commit comments