Fix registry auth by storing the string passed on the command line, and allowing for credential selection by normalizing on hostname. Also, remove remote ping calls from CmdPush and CmdPull.
Docker-DCO-1.1-Signed-off-by: Jake Moshenko <jake@devtable.com> (github: jakedt)
This commit is contained in:
@@ -91,7 +91,7 @@ func validateRepositoryName(repositoryName string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Resolves a repository name to a endpoint + name
|
||||
// Resolves a repository name to a hostname + name
|
||||
func ResolveRepositoryName(reposName string) (string, string, error) {
|
||||
if strings.Contains(reposName, "://") {
|
||||
// It cannot contain a scheme!
|
||||
@@ -117,11 +117,8 @@ func ResolveRepositoryName(reposName string) (string, string, error) {
|
||||
if err := validateRepositoryName(reposName); err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
endpoint, err := ExpandAndVerifyRegistryUrl(hostname)
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
return endpoint, reposName, err
|
||||
|
||||
return hostname, reposName, nil
|
||||
}
|
||||
|
||||
// this method expands the registry name as used in the prefix of a repo
|
||||
|
Reference in New Issue
Block a user