Fix publish command preferring default user instead of token auth
Closes #650
This commit is contained in:
parent
b62204054f
commit
9d42ee9391
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@ func execPublish(c *cli.Context) error {
|
||||||
fmt.Fprintf(c.App.ErrWriter, "\r%s\r", strings.Repeat(" ", 20))
|
fmt.Fprintf(c.App.ErrWriter, "\r%s\r", strings.Repeat(" ", 20))
|
||||||
}
|
}
|
||||||
options = append(options, client.WithBasicAuth(user, pass))
|
options = append(options, client.WithBasicAuth(user, pass))
|
||||||
} else if conf.DefaultUser != "" && conf.DefaultPassword != nil {
|
} else if token == "" && conf.DefaultUser != "" && conf.DefaultPassword != nil {
|
||||||
options = append(options, client.WithBasicAuth(conf.DefaultUser, *conf.DefaultPassword))
|
options = append(options, client.WithBasicAuth(conf.DefaultUser, *conf.DefaultPassword))
|
||||||
}
|
}
|
||||||
if pid > 0 {
|
if pid > 0 {
|
||||||
|
|
Loading…
Reference in a new issue