mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
fix(git-stacks): UI bugs when using a PAT when deploying from Git [EE-1731] (#5882)
This commit is contained in:
parent
5ba80c3a44
commit
32756f9e1b
5 changed files with 13 additions and 13 deletions
|
@ -74,6 +74,10 @@ func (handler *Handler) updateKubernetesStack(r *http.Request, stack *portainer.
|
|||
Username: payload.RepositoryUsername,
|
||||
Password: password,
|
||||
}
|
||||
_, err := handler.GitService.LatestCommitID(stack.GitConfig.URL, stack.GitConfig.ReferenceName, stack.GitConfig.Authentication.Username, stack.GitConfig.Authentication.Password)
|
||||
if err != nil {
|
||||
return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to fetch git repository", Err: err}
|
||||
}
|
||||
} else {
|
||||
stack.GitConfig.Authentication = nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue