mirror of
https://github.com/containers/skopeo.git
synced 2025-09-21 01:49:50 +00:00
get authConfig from either docker or cli
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
8
main.go
8
main.go
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/docker/docker/cliconfig"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -34,7 +35,7 @@ func main() {
|
||||
app.Flags = []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "debug",
|
||||
Usage: "enable debug output for logging",
|
||||
Usage: "enable debug output",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "username",
|
||||
@@ -46,6 +47,11 @@ func main() {
|
||||
Value: "",
|
||||
Usage: "registry password",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "docker-cfg",
|
||||
Value: cliconfig.ConfigDir(),
|
||||
Usage: "Docker's cli config for auth",
|
||||
},
|
||||
}
|
||||
app.Before = func(c *cli.Context) error {
|
||||
if c.GlobalBool("debug") {
|
||||
|
Reference in New Issue
Block a user