-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Server misbehaving when trying to push/pull/login to docker registry #31002
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
Comments
Related to #30885
|
I deploy with docker/nginx (swag). I have the nginx config setup properly (as advised in the docs) and haven't modified any of that. I did double check all of that though just to be sure. I did have some database warnings in the health page that I used the doctor to resolve.
This was present on nightly before I rolled back. Fixing it didn't resolve the issue. |
Could you share your nginx config? I did a quick test:
Without these
With these
I think these are expected behaviors. |
And one more thing, I can see that you are using Gitea in a sub-path. So have you checked/changed your |
Hmm, I can see one new problem here. By design (required by the "container" standard ....), the container |
This is the configuration I've been running for a while. I followed the documentation/an issue on the tracker here to set it up like so. It's been working really well until that commit as far as I am aware. Here is my nginx.
Let me know if anything should be changed. Yes I am using gitea in a sub-path. Thanks for the help so far! |
So, please add (just copy these from the |
I will add that as well when I can get back on my computer in the morning. Thanks for the advice and looking into the bug. I didn't realize that was supposed to go in that block as well. I'll be back on in the AM. Thanks again! |
Wasn't there a section in https://docs.gitea.com/administration/reverse-proxies which described the additional |
That's why I proposed: Improve reverse proxy documents #31003 |
Found the docs. It's only available in the "next" version, so with 1.22 docs. https://docs.gitea.com/next/administration/reverse-proxies#docker--container-registry |
The problem is that the section is too simple, it doesn't mention that the header & URI decoding requirements. |
@wxiaoguang so should I try |
No patch for logic change at the moment. "Improve reverse proxy documents #31003" is a document improvement:
So you could use nightly and add these headers to the |
I tested it, adding the headers did the trick. I agree the documentation wasn't quite clear on this particular use case when it comes to nginx. I'm not sure if you want me to close this or if you're wanting to keep it open until the documentation patch comes through? For anyone that is curious for a complete example nginx config with a sub folder (this is used with swag)
|
I added this example to the doc PR #31003 :
|
…ior (#31003) Fix #31002 1. Mention Make sure `Host` and `X-Fowarded-Proto` headers are correctly passed to Gitea 2. Clarify the basic requirements and move the "general configuration" to the top 3. Add a comment for the "container registry" 4. Use 1.21 behavior if the reverse proxy is not correctly configured Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
…ior (go-gitea#31003) Fix go-gitea#31002 1. Mention Make sure `Host` and `X-Fowarded-Proto` headers are correctly passed to Gitea 2. Clarify the basic requirements and move the "general configuration" to the top 3. Add a comment for the "container registry" 4. Use 1.21 behavior if the reverse proxy is not correctly configured Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
…ior (#31003) (#31020) Backport #31003 by wxiaoguang Fix #31002 1. Mention Make sure `Host` and `X-Fowarded-Proto` headers are correctly passed to Gitea 2. Clarify the basic requirements and move the "general configuration" to the top 3. Add a comment for the "container registry" 4. Use 1.21 behavior if the reverse proxy is not correctly configured Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Description
Issue with package registry. I've not changed anything in my configuration and all of a sudden I can't push/pull images from the package registry. I am on the latest nightly build.
I tried docker logout/login and still I get errors like this.
I get this error in the logs of gitea
Gitea Version
Current nightly build
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
nightly
Operating System
Docker/UnRaid
How are you running Gitea?
Docker
Database
MySQL/MariaDB
Edit
Rolling back to https://hub.docker.com/layers/gitea/gitea/1.22.0-rc1/images/sha256-031ba2851bbc155db8f676154730257aa803a7f46058e9eb409a89f6527fe09d?context=explore resolved the issue. I don't know the go language completely but I assume the failure comes somewhere in this commit 67c1a07#diff-36426f1aaff58f9b2084f7fc13593b237474e1d75a4e2883e0a44351e367ff76
maybe in here

Let me know if there is something I need to do on my end, thanks!
The text was updated successfully, but these errors were encountered: