jib: docker hub credentials 401 Unauthorized
jib-maven-plugin Configuration:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>0.10.0</version>
<configuration>
<to>
<image>registry.hub.docker.com/mhamdisemah/demo-jib</image>
<auth>
<username>mhamdisemah</username>
<password>mypass</password>
</auth>
</to>
</configuration>
</plugin>
Log output: Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.10.0:build (default-cli) on project demo_jib_docker: Build image failed, perhaps you should make sure your credentials for ‘registry.hub.docker.com’ are set up correctly: Unauthorized for registry.hub.docker.com/mhamdisemah/demo-jib: 401 Unauthorized [ERROR] {“errors”:[{“code”:“UNAUTHORIZED”,“message”:“authentication required”,“detail”:[{“Type”:“repository”,“Class”:“”,“Name”:“mhamdisemah/demo-jib”,“Action”:“pull”},{“Type”:“repository”,“Class”:“”,“Name”:“mhamdisemah/demo-jib”,“Action”:“push”}]}]}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (12 by maintainers)
It’d be worth trying the system property
sendCredentialsOverHttpanyway to see if it works. But as I said, we discourage its usage in general.@yanhongwang
I think your private registry at port 5000 is HTTP (not HTTPS). Did you set the system property
sendCredentialsOverHttpsomewhere? (https://github.com/GoogleContainerTools/jib/issues/1256#issuecomment-442109424)And we don’t recommend using an insecure or HTTP registry.