From 959b90319343fecfc0e11372efd2e1cc6ad7b11f Mon Sep 17 00:00:00 2001 From: pomidorry Date: Thu, 4 Jun 2026 13:41:52 +0300 Subject: [PATCH] remove dead GetSSHKeypairForURL --- modules/ssh/managed.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/modules/ssh/managed.go b/modules/ssh/managed.go index dd60501b1b..43d34796a8 100644 --- a/modules/ssh/managed.go +++ b/modules/ssh/managed.go @@ -64,15 +64,6 @@ func GetSSHKeypairForRepository(ctx context.Context, repo *repo_model.Repository return GetOrCreateSSHKeypairForUser(ctx, repo.OwnerID) } -// GetSSHKeypairForURL gets the appropriate SSH keypair for a given repository and URL -// Returns nil if the URL is not an SSH URL -func GetSSHKeypairForURL(ctx context.Context, repo *repo_model.Repository, url string) (*user_model.UserSSHKeypair, error) { - if !IsSSHURL(url) { - return nil, nil //nolint:nilnil // non-SSH URLs don't need a keypair - } - return GetSSHKeypairForRepository(ctx, repo) -} - // SetupManagedSSHAgent prepares SSH key-based authentication for a mirror or // migration git operation against remoteURL on behalf of repo. For non-SSH // URLs (or when no keypair is available) it is a no-op. The returned cleanup