fix(k8s): Git authentication info not persisted

This commit is contained in:
Hui
2021-09-06 10:57:47 +12:00
committed by GitHub
parent c809a5dbf2
commit 6fe6f36696

View File

@@ -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