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.

can not push to harbor

See original GitHub issue

mvn compile jib:build is success, but there is no image existed in harbor.

environment

  1. os = mac
  2. ide = idea

plugin config

                <plugin>
                    <groupId>com.google.cloud.tools</groupId>
                    <artifactId>jib-maven-plugin</artifactId>
                    <version>0.9.6</version>
                    <configuration>
                        <allowInsecureRegistries>true</allowInsecureRegistries>
                        <from>
                            <image>harbor.test.ximalaya.com/test/jdk8-tomcat8</image>
                        </from>
                        <to>
                            <image>harbor.test.ximalaya.com/test/jib-demo</image>
                        </to>
                        <container>
                            <mainClass>org.apache.catalina.startup.Bootstrap</mainClass>
                            <args>
                                <arg>start</arg>
                            </args>
                        </container>

                    </configuration>
                </plugin>

maven settings

      <server>
        <id>harbor.test.ximalaya.com</id>
        <username>admin</username>
        <password>mypassword</password>
      </server>

mvn compile jib:build output

[INFO] Retrieving registry credentials for harbor.test.ximalaya.com...
[INFO] Getting base image harbor.test.ximalaya.com/test/jdk8-tomcat8...
[INFO] Building dependencies layer...
[INFO] Building resources layer...
[INFO] Building classes layer...
[INFO] Retrieving registry credentials for harbor.test.ximalaya.com...
[INFO] Finalizing...
[INFO] 
[INFO] Container entrypoint set to [java, -cp, /app/libs/*:/app/resources/:/app/classes/, org.apache.catalina.startup.Bootstrap]
[INFO] 
[INFO] Built and pushed image as harbor.test.ximalaya.com/test/jib-demo

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
chanseokohcommented, Jul 18, 2018

@cai0329 looking at the logs and your configuration, I believe you are pulling/pushing to a private repo, serving at port 5000. We currently have a few relevant issues:

  1. If the port 5000 of the repo is HTTPS, the current design of Jib requires that the repo have a valid, trusted certificate. If you are using a self-signed certificate, you need a workaround for the moment: #543 UPDATE: #643 will fix this.
  2. If the port 5000 is HTTP and requires authenthication, there is no way to make it work at the moment, unfortunately. By the current design, Jib does not send the password over HTTP, where other parties in the network can see. UPDATE: #641 added the system property sendCredentialsOverHttp, with which you can force sending the password over HTTP.

We are discussing what would be the ideal ways to handle these scenarios.

1reaction
qiankunlicommented, Jul 23, 2018

@coollog it works in 0.9.7 thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can not push image to Harbor running on k8s #17091 - GitHub
My domain harbor.test.com . I used ingress nginx. I login to Harbor sucessed but push image error. Login success: # docker login harbor.test ......
Read more >
Pulling and Pushing Images in the Docker Client - Harbor docs
In your Docker client is not configured for insecure registries, you will see the following error when you attempt to pull or push...
Read more >
Pushing image to Harbor registry results in error "received ...
When trying to push image to Harbor registry We get the error "received ... We can see from the logs, it says "no...
Read more >
How to push a helm chart to Harbor using Helm CLI V3.7.2 ...
There are three options how helm charts can be pushed to Harbor. As you correctly found out yourself, you can install the helm...
Read more >
Harbor container registry integration - GitLab Docs
Malicious code pushed to your .gitlab-ci.yml file could compromise your variables, including $HARBOR_PASSWORD , and send them to a third-party server. For more ......
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