Skip to content

Commit

Permalink
cli/trust: GetNotaryRepository: remove uses of RepositoryInfo.Class
Browse files Browse the repository at this point in the history
The Class field was added because  Docker Hub registry required a special
scope to be set for pulling plugins;

    HTTP/1.1 401 Unauthorized
    ...
    Www-Authenticate: Bearer realm="https://auth.docker.io/token",service="registry.docker.io",scope="repository(plugin):vieux/sshfs:pull",error="insufficient_scope"

This is no longer a requirement, and the field is no longer set.

updates 0ba820e

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Nov 30, 2024
1 parent 61b02e6 commit ed9fcf3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion cli/trust/trust.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ func GetNotaryRepository(in io.Reader, out io.Writer, userAgent string, repoInfo
scope := auth.RepositoryScope{
Repository: repoInfo.Name.Name(),
Actions: actions,
Class: repoInfo.Class, // TODO(thaJeztah): Class is no longer needed for plugins and can likely be removed; see https://github.com/docker/cli/pull/4114#discussion_r1145430825
}
creds := simpleCredentialStore{auth: *authConfig}
tokenHandlerOptions := auth.TokenHandlerOptions{
Expand Down

0 comments on commit ed9fcf3

Please sign in to comment.