-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Registry: Error response from daemon: missing signature key after upgrade to 1.21.0 #28121
Comments
What is a |
I'm also curious. Specially because push is working from Gitea CI or local docker client, but not the pull. On the Demo Site it is working fine.
What is the router log? How do i get them? I created a test pipeline which can also be visited: https://gitea.sikorski.cloud/RogerSik/registry-test/actions/runs/1/jobs/0 Somehow it needs to be the client? Because now i got the same error but i wasn't fast enough to assign this image to this repository. So this repository was / is empty and the pull error was the message. Checking now my reverse proxy traefik. I get following message when using the pull command
Will troubleshooting forward in this direction. |
@KN4CK3R I am experiencing the same problem with a very similar environment setup as Roger; please see my logs below: Logs
In this case, I am attempting to run a CI pipeline for |
I did now exclued traefik and connected directly with Gitea. "Interesting" part is that the problem is still there. $ docker tag alpine:latest localhost:3000/rogersik/gitea-act-runner:development-test
$ docker push localhost:3000/rogersik/gitea-act-runner:development-test
The push refers to repository [localhost:3000/rogersik/gitea-act-runner]
cc2447e1835a: Layer already exists
development-test: digest: sha256:48d9183eb12a05c99bcc0bf44a003607b8e941e1d4f41f9ad12bdcc4b5672f86 size: 528
$ docker pull localhost:3000/rogersik/gitea-act-runner:development-test
development-test: Pulling from rogersik/gitea-act-runner
Digest: sha256:48d9183eb12a05c99bcc0bf44a003607b8e941e1d4f41f9ad12bdcc4b5672f86
Status: Image is up to date for localhost:3000/rogersik/gitea-act-runner:development-test
localhost:3000/rogersik/gitea-act-runner:development-test
$ docker image rm localhost:3000/rogersik/gitea-act-runner:development-test
Untagged: localhost:3000/rogersik/gitea-act-runner:development-test
Untagged: localhost:3000/rogersik/gitea-act-runner@sha256:48d9183eb12a05c99bcc0bf44a003607b8e941e1d4f41f9ad12bdcc4b5672f86
$ docker pull localhost:3000/rogersik/gitea-act-runner:development-test
development-test: Pulling from rogersik/gitea-act-runner
Digest: sha256:48d9183eb12a05c99bcc0bf44a003607b8e941e1d4f41f9ad12bdcc4b5672f86
Status: Downloaded newer image for localhost:3000/rogersik/gitea-act-runner:development-test
localhost:3000/rogersik/gitea-act-runner:development-test
$ docker system prune -af
Deleted Images:
$ docker pull localhost:3000/rogersik/gitea-act-runner:development-test
Error response from daemon: missing signature key So something Gitea relevated but with my configuration because of the try.gitea.io it did work. When executing $ docker pull localhost:3000/rogersik/gitea-act-runner:development-test appears in the container log.
But I was before authenticiated with docker login (push was also successfull). @EternalDeiwos has the same message. |
I think this is related at least in some regard, as it started happening after upgrading to 1.21.0 as well.
Previously I was using my users credentials. After generating an application specific token, I was able to login with that token and all was good again.
Not sure if it's relevant, but my account uses 2FA. Edit: Yes, it was relevant: |
What I find odd here is I am getting the expected 307 that redirects to my S3 storage containing the image layers… and the error message is complaining about a That said, I’ll play with the auth and see if I can at least rule it out as related. |
@evanreichard I also have 2FA enabled but i was using the application token. For testing I disabled 2FA and re-logged in with the normal user passwort. Sadly same error message:
The strange thing (from begin of this issue) is that uploads seems to working (no errors) but the pull is failing. |
I've tested with fresh admin-level credentials and I am pretty sure it is not auth related. Given local is working for Roger, I'd say that probably indicates something to do with #25543. Edit: also no change for 1.21.1. |
Further testing; after disabling |
Can confirm here the same. 🙌 |
Thanks for testing. Maybe a newer docker client version is more strict with the HTTP headers of the content. With
But the response from |
May still be wrong because you can't add arbitrary headers to the response:
|
Looks like the error message is from here: But that is unrelated to the serve direct setting...? The code is only used in Docker schema1 manifests which were removed in 08/23: What Docker version do you use? Does some setting enforces the usage of schema1 (which is not supported in Gitea)? |
I'm running Docker CE
Not as far as I have explicitly configured or am aware of... |
I've changed nothing other than the update to 1.21. I can push to packages but cannot pull. I tried to re login to docker and it's getting Tried to downgrade but the databases are not compatible. Any work arounds until a fix is out? Note: out of curiosity I pulled down the |
Maybe you need to check whether your |
I'll double-check it in the morning, but it was for the last several months with no configuration changes. Only the last update broke pulling from package registries for me. |
Maybe you have a different problem as this one? If that, you can create a new issue with more description. |
It's possible, actually, although it seems like it's similar. I'll produce the issue again tomorrow and post a more detailed bug in a separate issue. |
@KN4CK3R I have just seen the needs feedback tag, looking for anything specific? |
I had this problem, it turned out I had a rather old version of docker-ce running.
Docker version: |
I'm seeing this using Amazon S3 with Podman:
Docker:
|
same here, minio over blackblaze b2, SERVE_DIRECT=false fixes it |
…RVE_DIRECT` enabled (go-gitea#32365) Fix go-gitea#28121 I did some tests and found that the `missing signature key` error is caused by an incorrect `Content-Type` header. Gitea correctly sets the `Content-Type` header when serving files. https://github.com/go-gitea/gitea/blob/348d1d0f322ca57c459acd902f54821d687ca804/routers/api/packages/container/container.go#L712-L717 However, when `SERVE_DIRECT` is enabled, the `Content-Type` header may be set to an incorrect value by the storage service. To fix this issue, we can use query parameters to override response header values. https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html <img width="600px" src="https://github.com/user-attachments/assets/f2ff90f0-f1df-46f9-9680-b8120222c555" /> In this PR, I introduced a new parameter to the `URL` method to support additional parameters. ``` URL(path, name string, reqParams url.Values) (*url.URL, error) ``` --- Most S3-like services support specifying the content type when storing objects. However, Gitea always use `application/octet-stream`. Therefore, I believe we also need to improve the `Save` method to support storing objects with the correct content type. https://github.com/go-gitea/gitea/blob/b7fb20e73e63b8edc9b90c52073e248bef428fcc/modules/storage/minio.go#L214-L221
…RVE_DIRECT` enabled (#32365) (#32397) Backport #32365 Fix #28121 I did some tests and found that the `missing signature key` error is caused by an incorrect `Content-Type` header. Gitea correctly sets the `Content-Type` header when serving files. https://github.com/go-gitea/gitea/blob/348d1d0f322ca57c459acd902f54821d687ca804/routers/api/packages/container/container.go#L712-L717 However, when `SERVE_DIRECT` is enabled, the `Content-Type` header may be set to an incorrect value by the storage service. To fix this issue, we can use query parameters to override response header values. https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html <img width="600px" src="https://github.com/user-attachments/assets/f2ff90f0-f1df-46f9-9680-b8120222c555" /> In this PR, I introduced a new parameter to the `URL` method to support additional parameters. ``` URL(path, name string, reqParams url.Values) (*url.URL, error) ```
Description
Since the upgrade to 1.21.0 the docker image build succeed but the docker pull fails with
I suspect this is because of 1.21.0 because before the upgrade I din't have this problem. I can't
Test build locally with docker client
I builded the image now on three different ways
I deleted the :development image and rebuild it the same error happens. When using an unused tag example test1 same error.
When downloading a ready image like alpine:latest
Gitea Version
1.21.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
1.21.0
Operating System
Ubuntu 22.04 / K3s
How are you running Gitea?
Gitea with the official docker container running on K3S.
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: