go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.84k stars 5.47k forks source link

Infinite loop push Docker image #32270

Open WangZhongDian opened 2 weeks ago

WangZhongDian commented 2 weeks ago

Description

When I pushed Docker, it was obvious that the upload was already in progress, but there were infinite retries. I tested that uploading Docker to the center was normal

这是日志

2024/10/15 16:23:22 ...eb/routing/logger.go:102:func1() [I] router: completed GET /v2/ for 218.200.145.67:0, 401 Unauthorized in 0.3ms @ container/container.go:129(container.ReqContainerAccess)
Received disconnect from 172.17.0.1 port 44068:11: Bye Bye [preauth]
Disconnected from invalid user caimingwei 172.17.0.1 port 44068 [preauth]
2024/10/15 16:23:23 ...eb/routing/logger.go:102:func1() [I] router: completed GET /v2/token?account=youmetme&scope=repository%3Ayoumetme%2Fjre%3Apush%2Cpull&service=container_registry for 218.200.145.67:0, 200 OK in 365.1ms @ container/container.go:152(container.Authenticate)
2024/10/15 16:23:23 ...eb/routing/logger.go:102:func1() [I] router: completed GET /v2/youmetme/jre/blobs/sha256:6889c2fe38979b65070da5912c39951541fa5d00ff1e4316f1246ac0780d5a7b for 218.200.145.67:0, 404 Not Found in 8.5ms @ container/container.go:521(container.GetBlob)
2024/10/15 16:23:23 ...eb/routing/logger.go:102:func1() [I] router: completed GET /v2/youmetme/jre/blobs/sha256:154f02a6f4ff3179213e583eb4776bed04544b929d7c4611e9dd330242b31c70 for 218.200.145.67:0, 200 OK in 51.0ms @ container/container.go:521(container.GetBlob)
2024/10/15 16:23:23 ...eb/routing/logger.go:102:func1() [I] router: completed GET /v2/youmetme/jre/blobs/sha256:8235ecec634f7387ba5f6733f26f8eb8566345fe7648b40a5307f5e2c8dc88ef for 218.200.145.67:0, 200 OK in 34.0ms @ container/container.go:521(container.GetBlob)
2024/10/15 16:23:23 ...eb/routing/logger.go:102:func1() [I] router: completed GET /v2/youmetme/jre/blobs/sha256:43c4264eed91be63b206e17d93e75256a6097070ce643c5e8f0379998b44f170 for 218.200.145.67:0, 200 OK in 85.1ms @ container/container.go:521(container.GetBlob)
2024/10/15 16:23:23 ...eb/routing/logger.go:102:func1() [I] router: completed POST /v2/youmetme/jre/blobs/uploads/ for 218.200.145.67:0, 202 Accepted in 9.7ms @ container/container.go:234(container.InitiateUploadBlob)
2024/10/15 16:23:23 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/actions/runner.v1.RunnerService/FetchTask for 218.200.145.67:0, 200 OK in 101.6ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm)
User root from 172.17.0.1 not allowed because not listed in AllowUsers

Gitea Version

1.22.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

image

image

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

SQLite

yp05327 commented 2 weeks ago

What does to the center mean?

WangZhongDian commented 2 weeks ago

What does to the center mean?

Sorry, it should be normal to upload to the docker central warehouse. What I want to prove is that it is not a local problem

lunny commented 1 week ago

What's the demo site url you can reproduce?

WangZhongDian commented 1 week ago

What's the demo site url you can reproduce?

How can I demonstrate uploading Docker images on demo.gitea.com

$ docker login demo.gitea.com
Username: youmetme
Password: 
Error response from daemon: Get "https://demo.gitea.com/v2/": unauthorized: authGroup.Verify
yp05327 commented 1 week ago

IIRC, the password should be a token. You can try it.