From ddf14ea6881564bfb6278ed4315fe013222e3c88 Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Mon, 9 Jan 2023 13:18:11 -0500 Subject: [PATCH] Deprecate git:: stripping --- api/internal/git/repospec.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api/internal/git/repospec.go b/api/internal/git/repospec.go index 1ac8ac6a7..d08d842e8 100644 --- a/api/internal/git/repospec.go +++ b/api/internal/git/repospec.go @@ -5,6 +5,7 @@ package git import ( "fmt" + "log" "net/url" "path/filepath" "strconv" @@ -270,7 +271,12 @@ func extractHost(n string) (string, string) { // although the git protocol (which is insecure and unsupported on many platforms, including Github) // will not actually be used as intended. func ignoreForcedGitProtocol(n string) string { - n, _ = trimPrefixIgnoreCase(n, "git::") + n, found := trimPrefixIgnoreCase(n, "git::") + if found { + log.Println("Warning: Forcing the git protocol using the 'git::' URL prefix is not supported. " + + "Kustomize currently strips this invalid prefix, but will stop doing so in a future release. " + + "Please remove the 'git::' prefix from your configuration.") + } return n }