Skip to content
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

harbor 使用 S3,默认就使用了path-style,无法使用virtual-hosted–style #21270

Open
bxd602 opened this issue Dec 3, 2024 · 3 comments

Comments

@bxd602
Copy link

bxd602 commented Dec 3, 2024

harbor 使用 S3,默认就使用了path-style,无法使用virtual-hosted–style

我通过代理请求发现 请求s3的 aws-sdk-go 还是很旧的 1.15.11版本

[02/Dec/2024:18:55:23 +0800] "PUT /{bucket}/docker/registry/v2/repositories/aigc/rembg/_uploads/ef0d14b7-9227-4bf5-861e-f28c9b639dfd/startedat HTTP/1.1" 403 1374 "-" "aws-sdk-go/1.15.11 (go1.23.2; linux; amd64)" "127.0.0.1" "xx.xx.com" "keep-alive" "-" "-" "-" "gzip" "-" "-"

我是用的是 2.12.0的harbor,s3的配置如下

storage_service:
  s3:
    accesskey:  123123123123
    secretkey: 123123123123123
    region: ap-guangzhou
    regionendpoint: https://cos.ap-guangzhou.myqcloud.com
    forcepathstyle: false
    # accelerate: false
    bucket: 1231231231
    # encrypt: true
    # secure: true
    # skipverify: true
    # v4auth: false
    chunksize: 5242880
    multipartcopychunksize: 33554432
    multipartcopymaxconcurrency: 1000
    multipartcopythresholdsize: 5368709120
    rootdirectory: /
    loglevel: debug

这个该如何升级呢?需要重编源码吗

@Vad1mo
Copy link
Member

Vad1mo commented Dec 3, 2024

see related distribution/distribution#4452

@bxd602
Copy link
Author

bxd602 commented Dec 3, 2024

see related distribution/distribution#4452

Hello,Vad1mo

Thanks for your reply.
I saw this issue, but it seems to be unresolved...
I set up a nginx proxy, showing aws-sdk-go version is 1.15.11, is not 1.55.x.
Should I rebuild a new version Harbor with the latest aws-sdk-go ?

@reasonerjt
Copy link
Contributor

@bxd602 you may try, but we are not sure if there's any break-change in the sdk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants