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"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/containers/image/docker"
|
"github.com/containers/image/docker"
|
||||||
@ -75,7 +74,7 @@ func loginCmd(c *cli.Context) error {
|
|||||||
}
|
}
|
||||||
sc.DockerInsecureSkipTLSVerify = !c.BoolT("tls-verify")
|
sc.DockerInsecureSkipTLSVerify = !c.BoolT("tls-verify")
|
||||||
if c.String("cert-dir") != "" {
|
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 {
|
if err = docker.CheckAuth(context.TODO(), sc, username, password, server); err == nil {
|
||||||
|
Reference in New Issue
Block a user