Skip to content

Fix: bad request will remove header and retry login#429

Closed
tico88612 wants to merge 1 commit intoapple:mainfrom
tico88612:fix/bad-request-remove-auth
Closed

Fix: bad request will remove header and retry login#429
tico88612 wants to merge 1 commit intoapple:mainfrom
tico88612:fix/bad-request-remove-auth

Conversation

@tico88612
Copy link
Copy Markdown
Contributor

@tico88612 tico88612 commented Nov 22, 2025

If you're requesting on /v2/ with basic auth, AWS ECR will return 400 Bad Request and won't provide www-authenticate information.

Retry the request after removing the Authorization header.

Fixed apple/container#847

@dcantah
Copy link
Copy Markdown
Member

dcantah commented Nov 22, 2025

Hi @tico88612, thanks! Please run make fmt to fix the formatting here

@tico88612 tico88612 force-pushed the fix/bad-request-remove-auth branch from 1ce6c9d to dae001e Compare November 22, 2025 08:38
@tico88612
Copy link
Copy Markdown
Contributor Author

tico88612 commented Nov 22, 2025

@dcantah Oh, I forgot it. Done.

@tico88612 tico88612 force-pushed the fix/bad-request-remove-auth branch 3 times, most recently from 45ec596 to 51ebf50 Compare November 22, 2025 13:18
@tico88612 tico88612 force-pushed the fix/bad-request-remove-auth branch from 51ebf50 to 56712fe Compare December 16, 2025 15:02
@tico88612
Copy link
Copy Markdown
Contributor Author

Friendly ping @dcantah

What do you think about this PR?

If you're requesting on /v2/ with basic auth, AWS ECR will return 400 Bad Request and won't provide www-authenticate information.
Retry the request after removing the Authorization header.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
@tico88612 tico88612 force-pushed the fix/bad-request-remove-auth branch from 56712fe to 0d9c991 Compare January 18, 2026 15:27
@crosbymichael
Copy link
Copy Markdown
Contributor

Thanks for the fix. When you have time again, can you rebase and open a new PR. We will prioritize getting it merged in. Thanks!

@tico88612
Copy link
Copy Markdown
Contributor Author

Hi @crosbymichael

The new PR is here (#711) and I've already rebased it. I hope it won't take too much longer again. Thanks!

crosbymichael pushed a commit that referenced this pull request Apr 29, 2026
If you're requesting on `/v2/` with basic auth, AWS ECR will return 400
Bad Request and won't provide `www-authenticate` information.

Retry the request after removing the Authorization header.

Continue PR #429

Fixed apple/container#847

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
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.

[Bug]: registry login fails with AWS ECR

4 participants