upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-09-12 16:39:57 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-09-12 16:39:57 +0100
commitca33d4d2effff63986038c94e69a7484ddfa1839 (patch)
treeb97444fe924aa31275c078c4c59c30e7e930a8d2
parent080f2b4c234e485755a9e376f530a3c68984c5d0 (diff)
fix(remote): generalise auth failure detection
by using words or short phrases
-rw-r--r--src/bin/git_remote_nostr/utils.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/git_remote_nostr/utils.rs b/src/bin/git_remote_nostr/utils.rs
index 40fe937..6e09851 100644
--- a/src/bin/git_remote_nostr/utils.rs
+++ b/src/bin/git_remote_nostr/utils.rs
@@ -298,9 +298,10 @@ pub fn error_might_be_authentication_related(error: &anyhow::Error) -> bool {
298 for s in [ 298 for s in [
299 "no ssh keys found", 299 "no ssh keys found",
300 "invalid or unknown remote ssh hostkey", 300 "invalid or unknown remote ssh hostkey",
301 "all authentication attempts failed", 301 "authentication",
302 "Permission to", 302 "Permission",
303 "Repository not found", 303 "permission",
304 "not found",
304 ] { 305 ] {
305 if error_str.contains(s) { 306 if error_str.contains(s) {
306 return true; 307 return true;