Skip to content

Commit

Permalink
allow no authentication for notary server
Browse files Browse the repository at this point in the history
Signed-off-by: Trishank K Kuppusamy <trishank.kuppusamy@datadoghq.com>
  • Loading branch information
trishankatdatadog committed Feb 5, 2020
1 parent d648918 commit 1eda162
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/tuf/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ func makeTransport(server, gun, tlsCaCert, timeout string) (http.RoundTripper, e

defaultAuth, err := getAuth(server)
if err != nil {
return nil, fmt.Errorf("cannot get default credentials: %v", err)
log.Debug(fmt.Errorf("cannot get default credentials: %v", err))
} else {
creds := simpleCredentialStore{auth: defaultAuth}
tokenHandler := auth.NewTokenHandler(base, creds, gun, "push", "pull")
modifiers = append(modifiers, auth.NewAuthorizer(challengeManager, tokenHandler))
}

creds := simpleCredentialStore{auth: defaultAuth}
tokenHandler := auth.NewTokenHandler(base, creds, gun, "push", "pull")
modifiers = append(modifiers, auth.NewAuthorizer(challengeManager, tokenHandler))

return transport.NewTransport(base, modifiers...), nil
}

Expand Down

0 comments on commit 1eda162

Please sign in to comment.