From 38969bbfadf2854f6acb1e515f8f388a01a018c2 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 9 May 2025 20:00:24 +0100 Subject: fix: always try git servers over other protocols remove the code that guessed whether it was an authentication failure and gave up is it wasn't. this prevents it from trying http for push when ssh is not supported eg. ngit-relay --- src/bin/git_remote_nostr/fetch.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/bin/git_remote_nostr/fetch.rs') diff --git a/src/bin/git_remote_nostr/fetch.rs b/src/bin/git_remote_nostr/fetch.rs index a7210d0..34a02fc 100644 --- a/src/bin/git_remote_nostr/fetch.rs +++ b/src/bin/git_remote_nostr/fetch.rs @@ -24,8 +24,7 @@ use nostr::nips::nip19; use nostr_sdk::{Event, ToBech32}; use crate::utils::{ - Direction, fetch_or_list_error_is_not_authentication_failure, - find_proposal_and_patches_by_branch_name, get_oids_from_fetch_batch, + Direction, find_proposal_and_patches_by_branch_name, get_oids_from_fetch_batch, get_open_or_draft_proposals, get_read_protocols_to_try, join_with_and, set_protocol_preference, }; @@ -196,12 +195,6 @@ pub fn fetch_from_git_server( format!("fetch: {formatted_url} failed over {protocol}: {error}").as_str(), )?; failed_protocols.push(protocol); - if protocol == &ServerProtocol::Ssh - && fetch_or_list_error_is_not_authentication_failure(&error) - { - // authenticated by failed to complete request - break; - } } else { success = true; if !failed_protocols.is_empty() { -- cgit v1.2.3