-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Docker auth config lookup portability
On various platforms, the Docker credentials store may return keys with URLs with a scheme ("https://") prefixed on all entries, or hostnames only. An exception to this is the legacy Docker index server, which appears as "https://index.docker.io/v1/". The push auth config is now selected by first resolving a valid ("non-legacy") entry, which will be either a hostname aka registry name, or the "https://index.docker.io/v1/" value. This value is then passed to `GetAuthConfig`, using the Docker library's existing lookup fallback behavior to handle URLs. Two additional legacy names are handled, as discovered by reading the ORAS' project's implementation with the same goal. See: https://github.com/oras-project/oras-go/blob/v1.2.2/pkg/auth/docker/resolver.go#L79-L86
- Loading branch information
1 parent
38830b1
commit 5bd7cdd
Showing
3 changed files
with
51 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters