mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 13:59:40 +02:00
feat(gitops): allow to skip tls verification [EE-5023] (#8668)
This commit is contained in:
parent
17839aa473
commit
feab2a757e
44 changed files with 266 additions and 188 deletions
|
@ -27,7 +27,7 @@ func DownloadGitRepository(stackID portainer.StackID, config gittypes.RepoConfig
|
|||
stackFolder := fmt.Sprintf("%d", stackID)
|
||||
projectPath := fileService.GetStackProjectPath(stackFolder)
|
||||
|
||||
err := gitService.CloneRepository(projectPath, config.URL, config.ReferenceName, username, password)
|
||||
err := gitService.CloneRepository(projectPath, config.URL, config.ReferenceName, username, password, config.TLSSkipVerify)
|
||||
if err != nil {
|
||||
if err == gittypes.ErrAuthenticationFailure {
|
||||
newErr := ErrInvalidGitCredential
|
||||
|
@ -38,7 +38,7 @@ func DownloadGitRepository(stackID portainer.StackID, config gittypes.RepoConfig
|
|||
return "", newErr
|
||||
}
|
||||
|
||||
commitID, err := gitService.LatestCommitID(config.URL, config.ReferenceName, username, password)
|
||||
commitID, err := gitService.LatestCommitID(config.URL, config.ReferenceName, username, password, config.TLSSkipVerify)
|
||||
if err != nil {
|
||||
newErr := fmt.Errorf("unable to fetch git repository id: %w", err)
|
||||
return "", newErr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue