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:
parent
c809a5dbf2
commit
6fe6f36696
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue