开源项目SDK:https://github.com/mingyang66/spring-parent
个人文档:https://mingyang66.github.io/raccoon-docs/#/
本地很久配置好了往maven中央仓库推送jar包的配置,突然间报如下错误
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.7.0:deploy
(injected-nexus-deploy) on project oceansky-json: Remote staging failed: Failed to deploy
artifacts: Could not transfer artifact io.github.mingyang66:emily-sdk:pom.asc:4.4.3 from/to
ossrh (https://s01.oss.sonatype.org:443/service/local/staging/deployByRepositoryId/iogithubmingyang66
-1324): status code: 401, reason phrase: Content access is protected by token (401) -> [Help 1]
查看官方网站:https://central.sonatype.org/faq/401-error/
401 Content access is protected by token
This error message indicates that you are likely publishing to OSSRH via your username and
password. While this was a previously allowed way of interacting with OSSRH, changes to the
authentication process have resulted in publishing requiring the use of a user token. We have
documentation on setting up a user token that will help.
解决方案参考:https://central.sonatype.org/publish/generate-token/