Skip to content

Commit 58c6020

Browse files
committed
fix: use http GET instead of HEAD as ghcr.io doesn't support HEAD /v2/
1 parent efb8068 commit 58c6020

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/registry/registry.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ func HealthCheck(registry string, insecureRegistries []string, rootCAs *x509.Cer
4444
Timeout: 5 * time.Second, // TODO: make this configurable
4545
}
4646

47+
// TODO: support http:// too
4748
url := "https://" + registry + "/v2/"
4849

49-
resp, err := client.Head(url)
50+
// TODO: use HEAD by default, and make it configurable (ghcr.io does not support HEAD)
51+
resp, err := client.Get(url)
5052
if err != nil {
5153
return err
5254
}

0 commit comments

Comments
 (0)