Skip to content

Commit

Permalink
Merge pull request containers#20621 from mtrmac/docker-compat-login
Browse files Browse the repository at this point in the history
Add --compat-auth-file to login and logout
  • Loading branch information
openshift-merge-bot[bot] authored Nov 17, 2023
2 parents 71aac2f + d0b3225 commit a6bb601
Show file tree
Hide file tree
Showing 75 changed files with 1,203 additions and 516 deletions.
2 changes: 0 additions & 2 deletions cmd/podman/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ func login(cmd *cobra.Command, args []string) error {
}

sysCtx := &types.SystemContext{
AuthFilePath: loginOptions.AuthFile,
DockerCertPath: loginOptions.CertDir,
DockerInsecureSkipTLSVerify: skipTLS,
}
setRegistriesConfPath(sysCtx)
Expand Down
4 changes: 1 addition & 3 deletions cmd/podman/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ func init() {

// Implementation of podman-logout.
func logout(cmd *cobra.Command, args []string) error {
sysCtx := &types.SystemContext{
AuthFilePath: logoutOptions.AuthFile,
}
sysCtx := &types.SystemContext{}
setRegistriesConfPath(sysCtx)
return auth.Logout(sysCtx, &logoutOptions, args)
}
4 changes: 4 additions & 0 deletions docs/source/markdown/podman-login.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ For more details about format and configurations of the auth.json file, see cont

@@option cert-dir

#### **--compat-auth-file**=*path*

Instead of updating the default credentials file, update the one at *path*, and use a Docker-compatible format.

#### **--get-login**

Return the logged-in user for the registry. Return error if no login is found.
Expand Down
4 changes: 4 additions & 0 deletions docs/source/markdown/podman-logout.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Remove the cached credentials for all registries in the auth file

@@option authfile

#### **--compat-auth-file**=*path*

Instead of updating the default credentials file, update the one at *path*, and use a Docker-compatible format.

#### **--help**, **-h**

Print usage statement
Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ require (
github.com/checkpoint-restore/go-criu/v7 v7.0.0
github.com/containernetworking/cni v1.1.2
github.com/containernetworking/plugins v1.3.0
github.com/containers/buildah v1.32.1-0.20231026190652-11e3b2132761
github.com/containers/common v0.56.1-0.20231102181045-6a67921ec5ce
github.com/containers/buildah v1.32.1-0.20231117115950-f00af6b7d310
github.com/containers/common v0.57.0
github.com/containers/conmon v2.0.20+incompatible
github.com/containers/gvisor-tap-vsock v0.7.1
github.com/containers/image/v5 v5.28.1-0.20231101173728-373c52a9466f
github.com/containers/image/v5 v5.29.0
github.com/containers/libhvee v0.4.1-0.20231106202301-9651e31ae734
github.com/containers/ocicrypt v1.1.9
github.com/containers/psgo v1.8.0
github.com/containers/storage v1.50.3-0.20231108224651-a56f2b2fecfd
github.com/containers/storage v1.51.0
github.com/coreos/go-systemd/v22 v22.5.1-0.20231103132048-7d375ecc2b09
github.com/coreos/stream-metadata-go v0.4.3
github.com/crc-org/vfkit v0.1.2-0.20231030102423-f3c783d34420
Expand Down Expand Up @@ -54,7 +54,7 @@ require (
github.com/opencontainers/runtime-spec v1.1.1-0.20230922153023-c0e90434df2a
github.com/opencontainers/runtime-tools v0.9.1-0.20230914150019-408c51e934dc
github.com/opencontainers/selinux v1.11.0
github.com/openshift/imagebuilder v1.2.5
github.com/openshift/imagebuilder v1.2.6-0.20231108213319-b27edc077bbc
github.com/rootless-containers/rootlesskit v1.1.1
github.com/shirou/gopsutil/v3 v3.23.10
github.com/sirupsen/logrus v1.9.3
Expand Down Expand Up @@ -93,14 +93,14 @@ require (
github.com/chenzhuoyu/iasm v0.9.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/containerd/cgroups/v3 v3.0.2 // indirect
github.com/containerd/containerd v1.7.8 // indirect
github.com/containerd/containerd v1.7.9 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect
github.com/containers/luksy v0.0.0-20230912175440-6df88cb7f0dd // indirect
github.com/containers/luksy v0.0.0-20231030195837-b5a7f79da98b // indirect
github.com/coreos/go-oidc/v3 v3.7.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/cyberphone/json-canonicalization v0.0.0-20230710064741-aa7fe85c7dbd // indirect
github.com/cyberphone/json-canonicalization v0.0.0-20231011164504-785e29786b46 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/digitalocean/go-libvirt v0.0.0-20220804181439-8648fbde413e // indirect
github.com/disiqueira/gotree/v3 v3.0.2 // indirect
Expand All @@ -112,7 +112,7 @@ require (
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/gin-gonic/gin v1.9.1 // indirect
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.1 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
Expand Down Expand Up @@ -140,11 +140,11 @@ require (
github.com/google/pprof v0.0.0-20230323073829-e72429f035bd // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.4 // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jinzhu/copier v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/klauspost/compress v1.17.3 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/kr/fs v0.1.0 // indirect
Expand Down Expand Up @@ -198,13 +198,13 @@ require (
go.mongodb.org/mongo-driver v1.11.3 // indirect
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/otel v1.16.0 // indirect
go.opentelemetry.io/otel/metric v1.16.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
golang.org/x/arch v0.5.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/oauth2 v0.14.0 // indirect
golang.org/x/tools v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect
Expand Down
Loading

0 comments on commit a6bb601

Please sign in to comment.