Skip to content

Commit

Permalink
fix: login error on quay registry
Browse files Browse the repository at this point in the history
Unable to decode repository and actions: registry:catalog:*
Error code: 400

Signed-off-by: lukeb2e <12938238+lukeb2e@users.noreply.github.com>
  • Loading branch information
lukeb2e committed Apr 9, 2019
1 parent 681e240 commit a12e764
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions api/v1/registry/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,16 @@ func (cli *RegistryClient) Ping() error {
func (cli *RegistryClient) Login(username, password string) error {
tk, err := auth.NewToken(cli.URL(), username, password, "registry:catalog:*")
if err != nil {
if username == "" && password == "" {
return nil
}
log.Debugf("Try to login with less permissions (repository:catalog:*)")
tk, err = auth.NewToken(cli.URL(), username, password, "repository:catalog:*")

return err
if err != nil {
if username == "" && password == "" {
return nil
}

return err
}
}

cli.Token = tk
Expand Down

0 comments on commit a12e764

Please sign in to comment.