gpt4 book ai didi

maven - Spotify docker-maven-plugin 未经授权的 : authentication required public repo

转载 作者:IT老高 更新时间:2023-10-28 21:25:17 26 4
gpt4 key购买 nike

我无法使用以下命令将我的 docker 镜像推送到集线器:

mvn clean package docker:build -DpushImage

每次我收到以下回复:

[WARNING] Failed to push jdruwe/k8s-product-owner, retrying in 10 seconds (5/5).

...

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default-cli) on project k8s-product-owner: Exception caught: unauthorized: authentication required -> [Help 1]

当我尝试使用以下命令之一登录时,即使登录成功,我也会不断收到错误

docker login -u jdruwe https://index.docker.io/v1/

OR

docker login

我确实在集线器上创建了一个空仓库,只是为了尝试修复它:

enter image description here

有什么想法吗?

最佳答案

您是否正确配置了身份验证设置?

用户和密码可以在settings.xml中设置:

<servers>
<server>
<id>docker-hub</id>
<username>jdruwe</username>
<password>secret-password</password>
<configuration>
<email>foo@foo.bar</email>
</configuration>
</server>
</servers>

然后,pom 引用这些设置:

 <plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>VERSION GOES HERE</version>
<configuration>
[...]
<serverId>docker-hub</serverId>
<registryUrl>https://index.docker.io/v1/</registryUrl>
</configuration>
</plugin>

更多详细信息可以在这里找到:https://github.com/spotify/docker-maven-plugin#authenticating-with-private-registries

关于maven - Spotify docker-maven-plugin 未经授权的 : authentication required public repo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39924530/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com