一、该问题的重现步骤是什么?
将blade打包镜像推送到仓库异常:
项目配置:
本地docker仓库已经有这个镜像了,但是就是无法推送到服务器仓库。
这个是报错信息:
[ERROR] denied: requested access to the resource is denied
[WARNING] An attempt failed, will retry 1 more times
org.apache.maven.plugin.MojoExecutionException: Could not push image
at com.spotify.plugin.dockerfile.PushMojo.execute (PushMojo.java:90)
at com.spotify.plugin.dockerfile.AbstractDockerMojo.tryExecute (AbstractDockerMojo.java:265)
at com.spotify.plugin.dockerfile.AbstractDockerMojo.execute (AbstractDockerMojo.java:254)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: com.spotify.docker.client.exceptions.DockerException: denied: requested access to the resource is denied
at com.spotify.plugin.dockerfile.LoggingProgressHandler.handleError (LoggingProgressHandler.java:105)
at com.spotify.plugin.dockerfile.LoggingProgressHandler.progress (LoggingProgressHandler.java:63)
at com.spotify.docker.client.ProgressStream.tail (ProgressStream.java:77)
at com.spotify.docker.client.DefaultDockerClient$ResponseTailReader.call (DefaultDockerClient.java:2754)
at com.spotify.docker.client.DefaultDockerClient$ResponseTailReader.call (DefaultDockerClient.java:2738)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
at java.lang.Thread.run (Thread.java:748)
[WARNING] Did not find maven server configuration for docker server 192.168.11.8
[INFO] The push refers to repository [192.168.11.8/blade/blade-auth]
[INFO] Image a1cb8d166d6d: Preparing
[INFO] Image 6c5f2fbafa05: Preparing
[INFO] Image 022e61f1a07d: Preparing
[INFO] Image 91fef57e43c2: Preparing
[INFO] Image 86c7f9599ba1: Preparing
[INFO] Image d148a6d68ba3: Preparing
[INFO] Image 50644c29ef5a: Preparing
[INFO] Image 50644c29ef5a: Waiting
[INFO] Image d148a6d68ba3: Waiting
[ERROR] denied: requested access to the resource is denied
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for BladeX 2.8.1.RELEASE:
[INFO]
[INFO] BladeX ............................................. SUCCESS [ 1.122 s]
[INFO] blade-common ....................................... SUCCESS [ 2.461 s]
[INFO] blade-service-api .................................. SUCCESS [ 0.256 s]
[INFO] blade-user-api ..................................... SUCCESS [ 1.849 s]
[INFO] blade-system-api ................................... SUCCESS [ 2.283 s]
[INFO] blade-auth ......................................... FAILURE [03:18 min]
[INFO] blade-gateway ...................................... SKIPPED
[INFO] blade-ops .......................................... SKIPPED
[INFO] blade-admin ........................................ SKIPPED
[INFO] blade-dict-api ..................................... SKIPPED
[INFO] blade-develop ...................................... SKIPPED
[INFO] blade-scope-api .................................... SKIPPED
[INFO] blade-ops-api ...................................... SKIPPED
[INFO] blade-flow-api ..................................... SKIPPED
[INFO] blade-flow ......................................... SKIPPED
[INFO] blade-flow-design .................................. SKIPPED
[INFO] blade-log .......................................... SKIPPED
[INFO] blade-report ....................................... SKIPPED
[INFO] blade-resource-api ................................. SKIPPED
[INFO] blade-resource ..................................... SKIPPED
[INFO] blade-swagger ...................................... SKIPPED
[INFO] blade-turbine ...................................... SKIPPED
[INFO] blade-xxljob ....................................... SKIPPED
[INFO] blade-xxljob-admin ................................. SKIPPED
[INFO] blade-plugin ....................................... SKIPPED
[INFO] blade-plugin-api ................................... SKIPPED
[INFO] blade-desk-api ..................................... SKIPPED
[INFO] blade-service ...................................... SKIPPED
[INFO] blade-desk ......................................... SKIPPED
[INFO] blade-system ....................................... SKIPPED
[INFO] blade-user ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:27 min
[INFO] Finished at: 2021-07-21T10:32:20+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.13:push (default-cli) on project blade-auth: Could not push image: denied: requested access to the resource is den
ied -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn
主要错误原因:Could not push image: denied: requested access to the resource is denied
解决办法参考下这个帖子:https://sample.blog.csdn.net/article/details/70156144
扫一扫访问 Blade技术社区 移动端