From 62b81e7e79044dabc5737e3bb4ed9579ad514c70 Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Tue, 21 Feb 2023 10:32:54 +0100 Subject: [PATCH] Clear the GH token when downloading kustomize The kustomize installation script passes the value of ${GITHUB_TOKEN} to the API, which results in failures if the token isn't valid for Kustomize itself. Since updating the Submariner bundle shouldn't ever involve a token valid for Kustomize, clear the token when invoking the installation script. Signed-off-by: Stephen Kitt --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0cdfdfaa1..321253cbd 100644 --- a/Makefile +++ b/Makefile @@ -166,12 +166,13 @@ is-semantic-version: $(error 'ERROR: VERSION "$(BUNDLE_VERSION)" does not match the format required by operator-sdk.') endif -## Download kustomize locally if not already downloaded. +# Download kustomize locally if not already downloaded. +# We clear GITHUB_TOKEN to ensure that the installation script won't try to use it (and fail) KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" KUSTOMIZE_VERSION := $(shell $(GO) list -m -f {{.Version}} sigs.k8s.io/kustomize/kustomize/v3) $(KUSTOMIZE): mkdir -p $(@D) - { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(@D); } + { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | GITHUB_TOKEN= bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(@D); } kustomize: $(KUSTOMIZE)