1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 14:29:40 +02:00

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -164,6 +164,13 @@ func (handler *Handler) createKubernetesStackFromGitRepository(w http.ResponseWr
IsComposeFormat: payload.ComposeFormat, 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))) projectPath := handler.FileService.GetStackProjectPath(strconv.Itoa(int(stack.ID)))
stack.ProjectPath = projectPath stack.ProjectPath = projectPath