Skip to content

fix(ci): force virtual-hosted-style for OSS mirror upload#42

Merged
ysyneu merged 1 commit intomainfrom
fix/oss-virtual-hosted-style
May 8, 2026
Merged

fix(ci): force virtual-hosted-style for OSS mirror upload#42
ysyneu merged 1 commit intomainfrom
fix/oss-virtual-hosted-style

Conversation

@ysyneu
Copy link
Copy Markdown
Collaborator

@ysyneu ysyneu commented May 8, 2026

Problem

Mirror upload on the install-sh.yml run for #41 failed with:

upload failed: ./install.sh to s3://***/***/install.sh
An error occurred (SecondLevelDomainForbidden) when calling the PutObject operation:
Please use virtual hosted style to access.

Aliyun OSS rejects path-style S3 requests. AWS CLI v2 defaults to path-style when talking to a custom --endpoint-url, hence the failure.

Fix

Set default.s3.addressing_style=virtual before each upload step so the CLI builds <bucket>.<endpoint>/<key> URLs. Harmless on backends that accept either style (Tencent COS, MinIO, etc.).

Test plan

  • YAML parse OK
  • Merge → mirror install.sh job succeeds → curl https://flashduty-public.oss-cn-beijing.aliyuncs.com/flashduty-runner/install.sh returns 200 with matching sha256
  • Cut a test tag → goreleaser mirror step succeeds → release artifacts and releases/latest land in the bucket

🤖 Generated with Claude Code

Aliyun OSS rejects path-style requests with SecondLevelDomainForbidden.
AWS CLI defaults to path-style for custom endpoints — set
s3.addressing_style=virtual so PUT goes to <bucket>.<endpoint>/<key>
instead of <endpoint>/<bucket>/<key>. Harmless for backends that accept
either style.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ysyneu ysyneu merged commit e6fb244 into main May 8, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant