From 7f9c5c25ae03288caaea90ec98e61d1e8f45666d Mon Sep 17 00:00:00 2001 From: dwertent Date: Wed, 13 Oct 2021 11:58:22 +0300 Subject: [PATCH] fixed #76 --- policyhandler/handlepullpolicies.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/policyhandler/handlepullpolicies.go b/policyhandler/handlepullpolicies.go index 858ea5d9..ddceff4b 100644 --- a/policyhandler/handlepullpolicies.go +++ b/policyhandler/handlepullpolicies.go @@ -2,6 +2,7 @@ package policyhandler import ( "fmt" + "strings" "github.com/armosec/kubescape/cautils" "github.com/armosec/kubescape/cautils/armotypes" @@ -24,6 +25,9 @@ func (policyHandler *PolicyHandler) GetPoliciesFromBackend(notification *opapoli exceptionPolicies = append(exceptionPolicies, recExceptionPolicies...) } } else if err != nil { + if strings.Contains(err.Error(), "unsupported protocol scheme") { + err = fmt.Errorf("failed to download from GitHub release, try running with `--use-default` flag") + } return nil, nil, fmt.Errorf("kind: %v, name: %s, error: %s", rule.Kind, rule.Name, err.Error()) }