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 <github@gone.nl>
(cherry picked from commit ed9fcf3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Nov 30, 2024
1 parent 9ea09fd commit 5a0508c
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 5a0508c

Please sign in to comment.