summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/login.go17
-rw-r--r--cmd/podman/logout.go4
-rw-r--r--cmd/podman/pull.go8
-rw-r--r--cmd/podman/push.go6
-rw-r--r--cmd/podman/runlabel.go2
-rw-r--r--cmd/podman/search.go2
-rw-r--r--cmd/podman/shared/container.go2
-rw-r--r--cmd/podman/shared/create.go2
-rw-r--r--cmd/podman/sign.go6
9 files changed, 25 insertions, 24 deletions
diff --git a/cmd/podman/login.go b/cmd/podman/login.go
index 96b4ac2a2..f91366eac 100644
--- a/cmd/podman/login.go
+++ b/cmd/podman/login.go
@@ -6,14 +6,15 @@ import (
"os"
"strings"
- "github.com/containers/image/v4/docker"
- "github.com/containers/image/v4/pkg/docker/config"
- "github.com/containers/image/v4/types"
+ "github.com/containers/image/v5/docker"
+ "github.com/containers/image/v5/pkg/docker/config"
+ "github.com/containers/image/v5/types"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod/image"
"github.com/docker/docker-credential-helpers/credentials"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/crypto/ssh/terminal"
)
@@ -134,15 +135,15 @@ func loginCmd(c *cliconfig.LoginValues) error {
return err
}
}
- switch err {
- case nil:
+ if err == nil {
fmt.Println("Login Succeeded!")
return nil
- case docker.ErrUnauthorizedForCredentials:
+ }
+ if unauthorizedError, ok := err.(docker.ErrUnauthorizedForCredentials); ok {
+ logrus.Debugf("error logging into %q: %v", server, unauthorizedError)
return errors.Errorf("error logging into %q: invalid username/password", server)
- default:
- return errors.Wrapf(err, "error authenticating creds for %q", server)
}
+ return errors.Wrapf(err, "error authenticating creds for %q", server)
}
// getUserAndPass gets the username and password from STDIN if not given
diff --git a/cmd/podman/logout.go b/cmd/podman/logout.go
index 6d6db4b41..ef3452afe 100644
--- a/cmd/podman/logout.go
+++ b/cmd/podman/logout.go
@@ -3,8 +3,8 @@ package main
import (
"fmt"
- "github.com/containers/image/v4/docker"
- "github.com/containers/image/v4/pkg/docker/config"
+ "github.com/containers/image/v5/docker"
+ "github.com/containers/image/v5/pkg/docker/config"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod/image"
diff --git a/cmd/podman/pull.go b/cmd/podman/pull.go
index f8a658297..905b1987d 100644
--- a/cmd/podman/pull.go
+++ b/cmd/podman/pull.go
@@ -6,10 +6,10 @@ import (
"os"
"strings"
- "github.com/containers/image/v4/docker"
- dockerarchive "github.com/containers/image/v4/docker/archive"
- "github.com/containers/image/v4/transports/alltransports"
- "github.com/containers/image/v4/types"
+ "github.com/containers/image/v5/docker"
+ dockerarchive "github.com/containers/image/v5/docker/archive"
+ "github.com/containers/image/v5/transports/alltransports"
+ "github.com/containers/image/v5/types"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod/image"
diff --git a/cmd/podman/push.go b/cmd/podman/push.go
index 36c4988a1..0fdfb6202 100644
--- a/cmd/podman/push.go
+++ b/cmd/podman/push.go
@@ -6,9 +6,9 @@ import (
"os"
"strings"
- "github.com/containers/image/v4/directory"
- "github.com/containers/image/v4/manifest"
- "github.com/containers/image/v4/types"
+ "github.com/containers/image/v5/directory"
+ "github.com/containers/image/v5/manifest"
+ "github.com/containers/image/v5/types"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod/image"
diff --git a/cmd/podman/runlabel.go b/cmd/podman/runlabel.go
index 0369612b9..7359bc0c7 100644
--- a/cmd/podman/runlabel.go
+++ b/cmd/podman/runlabel.go
@@ -6,7 +6,7 @@ import (
"os"
"strings"
- "github.com/containers/image/v4/types"
+ "github.com/containers/image/v5/types"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/libpodruntime"
"github.com/containers/libpod/cmd/podman/shared"
diff --git a/cmd/podman/search.go b/cmd/podman/search.go
index 9dad69297..cdcb30a59 100644
--- a/cmd/podman/search.go
+++ b/cmd/podman/search.go
@@ -5,7 +5,7 @@ import (
"strings"
"github.com/containers/buildah/pkg/formats"
- "github.com/containers/image/v4/types"
+ "github.com/containers/image/v5/types"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod/image"
diff --git a/cmd/podman/shared/container.go b/cmd/podman/shared/container.go
index 15bbb46d2..bc64d63a9 100644
--- a/cmd/podman/shared/container.go
+++ b/cmd/podman/shared/container.go
@@ -13,7 +13,7 @@ import (
"sync"
"time"
- "github.com/containers/image/v4/types"
+ "github.com/containers/image/v5/types"
"github.com/containers/libpod/libpod"
"github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/libpod/image"
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index bf9410b72..f37f5fa62 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -12,7 +12,7 @@ import (
"syscall"
"time"
- "github.com/containers/image/v4/manifest"
+ "github.com/containers/image/v5/manifest"
"github.com/containers/libpod/cmd/podman/shared/parse"
"github.com/containers/libpod/libpod"
"github.com/containers/libpod/libpod/image"
diff --git a/cmd/podman/sign.go b/cmd/podman/sign.go
index b6e82ba0b..bc909b64e 100644
--- a/cmd/podman/sign.go
+++ b/cmd/podman/sign.go
@@ -8,9 +8,9 @@ import (
"strconv"
"strings"
- "github.com/containers/image/v4/signature"
- "github.com/containers/image/v4/transports"
- "github.com/containers/image/v4/transports/alltransports"
+ "github.com/containers/image/v5/signature"
+ "github.com/containers/image/v5/transports"
+ "github.com/containers/image/v5/transports/alltransports"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/libpodruntime"
"github.com/containers/libpod/libpod/image"