question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docker hub credentials 401 Unauthorized

See original GitHub issue

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”}]}]}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
chanseokohcommented, Feb 25, 2019

It’d be worth trying the system property sendCredentialsOverHttp anyway to see if it works. But as I said, we discourage its usage in general.

1reaction
chanseokohcommented, Feb 25, 2019

@yanhongwang

When I execute the command: $ mvn compile jib:build

I think your private registry at port 5000 is HTTP (not HTTPS). Did you set the system property sendCredentialsOverHttp somewhere? (https://github.com/GoogleContainerTools/jib/issues/1256#issuecomment-442109424)

And we don’t recommend using an insecure or HTTP registry.

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker unauthorized: authentication required - upon push with ...
Step 1: log in to docker hub. Based on @KaraPirinc's comment, in Docker version 17 in order to log in: docker login -u...
Read more >
Docker login 401 Unauthorized - Nexus Repository Manager
I'm having a similar issue. As per the documentation: Provide your repository manager credentials of username and password as well as an email ......
Read more >
Troubleshoot registry login - Azure - Microsoft Docs
Check Docker configuration · Specify correct registry name · Confirm credentials to access registry · Confirm credentials are authorized to access ...
Read more >
rpc error: code = Unknown desc = failed to fetch oauth token ...
Failed to authorize: rpc error: code = Unknown desc = failed to fetch oauth token: unexpected status: 401 Unauthorized · Docker Hub General....
Read more >
Troubleshooting errors with Docker commands when using ...
HTTP 403 Errors or "no basic auth credentials" error when pushing to repository · You have authenticated to a different region · You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found