Fix docker hub login error when using image ref as target
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
@@ -63,7 +63,9 @@ func (a *RegistryAuthProvider) Credentials(ctx context.Context, req *bkauth.Cred
|
||||
}
|
||||
|
||||
func parseAuthHost(host string) (*url.URL, error) {
|
||||
if host == "registry-1.docker.io" {
|
||||
isDockerHub := !(strings.Contains(host, "amazonaws.com") || strings.Contains(host, "gcr.io") || strings.Contains(host, "microsoft.com"))
|
||||
|
||||
if host == "registry-1.docker.io" || isDockerHub {
|
||||
host = "https://index.docker.io/v1/"
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user