2 Commits
Author SHA1 Message Date
Dean Chen b4189c2f7f registry: map login HTTP status through errhttp.ToNative
translateV2AuthError only unwraps a url.Error from Do(); a 401
status never went through it. Use errhttp.ToNative so Auth()
treats that 401 as unauthorized and stops.

Signed-off-by: Dean Chen <862469039@qq.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-09-01 17:24:38 +02:00
Dean Chen 5e0fdb3f6e registry: treat basic-auth 401 as unauthorized
Client-side login (daemon down) was wrapping a 401 as a plain error, so
Auth() moved on to the next endpoint. That can print Login Succeeded if
the HTTP fallback happens to answer 200.

Fixes #7237

Signed-off-by: Dean Chen <862469039@qq.com>
2026-08-28 14:53:19 +05:00