private static String getRegistryUrl(final String registry) {
        final String reg = registry != null ? registry : REGISTRY_DEFAULT;
        if (REGISTRY_DOCKER_IO.equals(StringUtils.substringBefore(reg, "/"))) {
            return REGISTRY_DOCKER_IO_URL;
        }
        return reg;
    }
This method returns registry authentication URL.
In most cases it will be the same as registry, but for some it could be different.
For example for "docker.io" the authentication URL should be exactly "https://index.docker.io/v1/"

@param registry registry or null. If registry is null the default one is used (see REGISTRY_DEFAULT).
@return authentication URL for the given registry.
src/main/java/io/fabric8/maven/docker/access/AuthConfig.java