From 6fe6f366965e1aa68612ff4018efa0c7b15ef5dd Mon Sep 17 00:00:00 2001 From: Hui Date: Mon, 6 Sep 2021 10:57:47 +1200 Subject: [PATCH] fix(k8s): Git authentication info not persisted --- api/http/handler/stacks/create_kubernetes_stack.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/http/handler/stacks/create_kubernetes_stack.go b/api/http/handler/stacks/create_kubernetes_stack.go index 04dcf3bbb..7ff8d8d40 100644 --- a/api/http/handler/stacks/create_kubernetes_stack.go +++ b/api/http/handler/stacks/create_kubernetes_stack.go @@ -164,6 +164,13 @@ func (handler *Handler) createKubernetesStackFromGitRepository(w http.ResponseWr IsComposeFormat: payload.ComposeFormat, } + if payload.RepositoryAuthentication { + stack.GitConfig.Authentication = &gittypes.GitAuthentication{ + Username: payload.RepositoryUsername, + Password: payload.RepositoryPassword, + } + } + projectPath := handler.FileService.GetStackProjectPath(strconv.Itoa(int(stack.ID))) stack.ProjectPath = projectPath