Read anonymously when a saved login is rejected
Rolling Release / build (push) Successful in 1m38s
Rolling Release / publish (push) Successful in 8s

A stale login made every read fail, and search blamed the registry for
it. Reads now warn and retry without the login; publishing never does.
A refused or missing package after the fallback reports the rejected
login, so a private package can't be replaced from a lower channel.

Search shows the real error, and the README no longer says Gitea lacks
the catalog API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-11-30 20:35:29 -08:00
1 parent 83e694c6c4
commit 2026319f61
5 files changed
+190 -25

No files matched your search

+8 -4
View File
@@ -195,15 +195,19 @@ async fn load_creds_from_file(path : String, host : String) -> Creds? noraise {
}
///|
async fn load_creds(host : String) -> Creds? noraise {
/// The saved login for a host and the file it came from.
async fn load_creds(host : String) -> (Creds, String)? noraise {
let nhost = normalize_host(host)
if nhost == "" {
return None
}
match load_creds_from_file(auth_file_path(orbit_root()), nhost) {
Some(c) => Some(c)
None => load_creds_from_file(docker_config_path(), nhost)
for path in [auth_file_path(orbit_root()), docker_config_path()] {
match load_creds_from_file(path, nhost) {
Some(c) => return Some((c, path))
None => ()
}
}
None
}
///|