我正在使用这样的 Spotify Dockerfile maven 插件
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.4.10</version>
<executions>
<execution>
<id>default</id>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
<configuration>
<username>myUserName</username>
<password>myPassword</password>
<repository>dockerhubUsername/dockerhubRepo</repository>
<tag>latest</tag>
<buildArgs>
<JAR_FILE>${project.artifactId}.jar</JAR_FILE>
</buildArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
因此,每当我使用构建时,mvn deploy
都会出现此错误
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.10:push (default) on project nepse-sim: Could not push image: denied: requested access to the resource is denied -> [Help 1]
我已经在配置中指定了我的 dockerhub 用户名和密码,但我仍然收到此错误。任何帮助,将不胜感激。谢谢