发布jar到Maven中央仓库报错:Remote-Staging-Failed-Staging-Rules-Failure!

发布Jar到中央仓库报错 Remote staging failed: Staging rules failure!
意思是:
未遵守发布jar的规则,可以查看命令行中详细的错误描述【error】…
如果是手动发布,即在https://oss.sonatype.org/网址上发布的,可以点开页面下方的日志列表,查看错误描述。

提示:No public key: Key with id: (51xxxxxxc6) was not able to be located on

1
2
3
4
5
6
7
8
gpg --keyserver hkp://pool.sks-keyservers.net:11371 --send-keys  1982**************7F80B
gpg --keyserver hkp://pool.sks-keyservers.net:11371 --recv-keys 1982**************7F80B

gpg --keyserver hkp://keyserver.ubuntu.com:11371 --send-keys 1982**************7F80B
gpg --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 1982**************7F80B

gpg --keyserver hkp://keys.gnupg.net:11371 --send-keys 1982**************7F80B
gpg --keyserver hkp://keys.gnupg.net:11371 --recv-keys 1982**************7F80B

解决!!!