-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use jib-maven-plugin push image to harbor success, also can pull image from harbor, but can not find image in harbor's web ui #5729
Comments
@dragontree101 |
you means jib push image will not show on harbor ui? |
i don't know who would fix this issue, harhor or jib? i also open issue in harbor project. |
i think harbor should support other docker client, thanks! |
@dragontree101 Would you think of a solution and write a proposal for us to evaluate? |
Here are the registry logs when pushing image to goharbor registry using skopeo. Here is the http useragent that is used when pushing image http.request.useragent="Go-http-client/1.1" Can we please allow to show the images on web UI when pushed to goharbor registry using other docker clients such as skopeo time="2018-09-19T22:06:30.664474616Z" level=info msg="response completed" go.version=go1.7.3 http.request.contenttype="application/octet-stream" http.request.host=HOST_URL http.request.id=b1e345b6-d1cb-4a00-86cf-6f7301cb90b9 http.request.method=PUT http.request.remoteaddr=REMOTE_IP_ADDR http.request.uri="/v2/xxx/yyyy/blobs/uploads/d0808da1-c9e9-44c2-9ff0-a83c837b7c1a?_state=DWhk79IrbwvmvrrK-LgYxEs0wkAqREdb6bDsi6ZSlAF7Ik5hbWUiOiJlc2NlL2NzdC1zZWFyY2gtc3ZjLXYwMSIsIlVVSUQiOiJkMDgwOGRhMS1jOWU5LTQ0YzItOWZmMC1hODNjODM3YjdjMWEiLCJPZmZzZXQiOjI0MTI2LCJTdGFydGVkQXQiOiIyMDE4LTA5LTE5VDIyOjA2OjMwWiJ9&digest=sha256%3A60d5e9830658ddcc1031afa309aecbe494038cd992c4ec745df9fd38419ae1af" http.request.useragent="Go-http-client/1.1" http.response.duration=103.768951ms http.response.status=201 http.response.written=0 instance.id=84c7c09f-25f3-49cd-9db2-2ca810a4ac54 service=registry version=v2.6.2 100.65.2.253 - - [19/Sep/2018:22:06:30 +0000] "PUT /v2/xxx/yyyy/blobs/uploads/d0808da1-c9e9-44c2-9ff0-a83c837b7c1a?_state=DWhk79IrbwvmvrrK-LgYxEs0wkAqREdb6bDsi6ZSlAF7Ik5hbWUiOiJlc2NlL2NzdC1zZWFyY2gtc3ZjLXYwMSIsIlVVSUQiOiJkMDgwOGRhMS1jOWU5LTQ0YzItOWZmMC1hODNjODM3YjdjMWEiLCJPZmZzZXQiOjI0MTI2LCJTdGFydGVkQXQiOiIyMDE4LTA5LTE5VDIyOjA2OjMwWiJ9&digest=sha256%3A60d5e9830658ddcc1031afa309aecbe494038cd992c4ec745df9fd38419ae1af HTTP/1.1" 201 0 "" "Go-http-client/1.1" |
Same issue here. We build our images on a Kubernetes cluster in which exposing the Docker daemon for image build/push is not an option. I think this is a very common scenario and Harbor should support various different tools. Currently, this does not allow us to use Harbor at all. |
@fassmus are you also using jib or some other tools? |
@reasonerjt Yes we are using jib for building images and Skopeo for promoting images. |
podman is also affected by this |
Can someone explain why the User-Agent checks exists at all, please? The code already exists in the very first commit at harbor/service/notification.go Line 46 in f859348
It would make sense to me if the server changed the behavior of the API (e.g. to apply a specific workaround, or maybe to refuse known-invalid requests completely) depending on User-Agent; but if the request is accepted and performed in the same way for all kinds of clients, it seems reasonable to me that the UI should also behave consistently. It’s tempting to submit a PR that just removes the check, but I’d like to understand the purpose of the check first. |
Hi all, I do not want to tell false news, and I'm not sure at all but Harbor had a new release today and I feel like this bug is corrected: notification.go file mentionned above has been moved but I found this one that seems to handle the jib user agent: https://github.com/goharbor/harbor/blob/56d57b0093242e1e44d3e0c239e3537b50af71bb/src/core/service/notifications/registry/handler.go What I do not understand is why the need for a limited fixed hardcoded list of 'whitelisted' user-agent... |
I can confirm, |
@reasonerjt Could answer #5729 (comment) |
Fixes goharbor#5729 Signed-off-by: Jan-Otto Kröpke <[email protected]>
Fixes #5729 Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Yogi_Wang <[email protected]>
Fixes goharbor#5729 Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Wenkai Yin <[email protected]>
Fixes goharbor#5729 Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Wenkai Yin <[email protected]>
Fixes goharbor#5729 Signed-off-by: Jan-Otto Kröpke <[email protected]>
If you are reporting a problem, please make sure the following information are provided:
1)Version of docker engine and docker-compose.
docker version is 18.06.1-ce
docker-compose version is 1.22.0
harbor verison is 1.6.0-rc2
2)Config files of harbor, you can get them by packaging "harbor.cfg" and files in the same directory, including subdirectory.
3)Log files, you can get them by package the /var/log/harbor/ .
The text was updated successfully, but these errors were encountered: