0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-06-21 23:17:38 +02:00

remove dead GetSSHKeypairForURL

This commit is contained in:
pomidorry 2026-06-04 13:41:52 +03:00
parent 4ad204ce55
commit 959b903193

View File

@ -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