Allow anonymous access to registry

This commit is contained in:
Dmitrij Fedorenko
2019-11-26 08:33:10 +03:00
parent fe8c467e70
commit 82ade6b5aa
+2 -2
View File
@@ -74,13 +74,13 @@ func mainfestToolPath() string {
func (p *Plugin) Exec() error {
args := []string{}
if p.Config.Username == "" {
if p.Config.Username == "" && p.Config.Password != "" {
return errors.New("you must provide a username")
} else {
args = append(args, fmt.Sprintf("--username=%s", p.Config.Username))
}
if p.Config.Password == "" {
if p.Config.Password == "" && p.Config.Username != "" {
return errors.New("you must provide a password")
} else {
args = append(args, fmt.Sprintf("--password=%s", p.Config.Password))