feat(gitops): tidy up git auth [BE-12666] (#2026)

This commit is contained in:
Devon Steenberg
2026-03-23 13:53:04 +13:00
committed by GitHub
parent f199d0882f
commit bd9c3c1593
29 changed files with 477 additions and 635 deletions
-4
View File
@@ -19,11 +19,9 @@ var (
func DownloadGitRepository(config gittypes.RepoConfig, gitService portainer.GitService, getProjectPath func() string) (string, error) {
username := ""
password := ""
authType := gittypes.GitCredentialAuthType_Basic
if config.Authentication != nil {
username = config.Authentication.Username
password = config.Authentication.Password
authType = config.Authentication.AuthorizationType
}
projectPath := getProjectPath()
@@ -33,7 +31,6 @@ func DownloadGitRepository(config gittypes.RepoConfig, gitService portainer.GitS
config.ReferenceName,
username,
password,
authType,
config.TLSSkipVerify,
)
if err != nil {
@@ -51,7 +48,6 @@ func DownloadGitRepository(config gittypes.RepoConfig, gitService portainer.GitS
config.ReferenceName,
username,
password,
authType,
config.TLSSkipVerify,
)
if err != nil {