mirror of
https://github.com/containers/podman.git
synced 2025-06-19 16:33:24 +08:00
Fix --cert-dir path for podman login
podman login would add on the registry name to the cert-dir path making containers/image look in a directory that did not exist for certificates. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #283 Approved by: rhatdan
This commit is contained in:
@ -5,7 +5,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/containers/image/docker"
|
||||
@ -75,7 +74,7 @@ func loginCmd(c *cli.Context) error {
|
||||
}
|
||||
sc.DockerInsecureSkipTLSVerify = !c.BoolT("tls-verify")
|
||||
if c.String("cert-dir") != "" {
|
||||
sc.DockerCertPath = filepath.Join(c.String("cert-dir"), server)
|
||||
sc.DockerCertPath = c.String("cert-dir")
|
||||
}
|
||||
|
||||
if err = docker.CheckAuth(context.TODO(), sc, username, password, server); err == nil {
|
||||
|
Reference in New Issue
Block a user