From 3d04e9024693b35ab7717736ced4185f791936ee Mon Sep 17 00:00:00 2001 From: ajayk Date: Thu, 24 Oct 2024 12:09:26 -0700 Subject: [PATCH] allow key lookups for http --- pkg/apk/apk/implementation.go | 4 ++-- pkg/apk/auth/auth_test.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 pkg/apk/auth/auth_test.go diff --git a/pkg/apk/apk/implementation.go b/pkg/apk/apk/implementation.go index 027461e3..ba34e8ad 100644 --- a/pkg/apk/apk/implementation.go +++ b/pkg/apk/apk/implementation.go @@ -927,8 +927,8 @@ func (a *APK) fetchChainguardKeys(ctx context.Context, repository string) error log := clog.FromContext(ctx) - if !strings.HasPrefix(repository, "https://") { - log.Debugf("ignoring non-https repository %s", repository) + if !strings.HasPrefix(repository, "https://") && !strings.HasPrefix(repository, "http://") { + log.Debugf("ignoring non-http(s) repository %s", repository) return nil } diff --git a/pkg/apk/auth/auth_test.go b/pkg/apk/auth/auth_test.go new file mode 100644 index 00000000..8832b06d --- /dev/null +++ b/pkg/apk/auth/auth_test.go @@ -0,0 +1 @@ +package auth