mirror of
https://github.com/drone-plugins/drone-manifest.git
synced 2026-06-04 18:24:08 +08:00
Allow anonymous access to registry
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user