mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 22:39:41 +02:00
fix(edge-stack): edge stack git authentication issues EE-5595 (#9228)
This commit is contained in:
parent
b8f20a4f05
commit
ff1f549590
1 changed files with 2 additions and 2 deletions
|
@ -17,8 +17,8 @@ func ValidateRepoConfig(repoConfig *gittypes.RepoConfig) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ValidateRepoAuthentication(auth *gittypes.GitAuthentication) error {
|
func ValidateRepoAuthentication(auth *gittypes.GitAuthentication) error {
|
||||||
if auth != nil && govalidator.IsNull(auth.Password) {
|
if auth != nil && govalidator.IsNull(auth.Password) && auth.GitCredentialID == 0 {
|
||||||
return httperrors.NewInvalidPayloadError("Invalid repository credentials. Password must be specified when authentication is enabled")
|
return httperrors.NewInvalidPayloadError("Invalid repository credentials. Password or GitCredentialID must be specified when authentication is enabled")
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue