mirror of
https://github.com/containers/skopeo.git
synced 2025-06-28 15:47:34 +00:00
Merge pull request #1946 from containers/renovate/github.com-containers-common-0.x
Update module github.com/containers/common to v0.51.1
This commit is contained in:
commit
81c63c331f
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module github.com/containers/skopeo
|
|||||||
go 1.18
|
go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/containers/common v0.51.0
|
github.com/containers/common v0.51.1
|
||||||
github.com/containers/image/v5 v5.24.2-0.20230215091257-15e211694ae5
|
github.com/containers/image/v5 v5.24.2-0.20230215091257-15e211694ae5
|
||||||
github.com/containers/ocicrypt v1.1.7
|
github.com/containers/ocicrypt v1.1.7
|
||||||
github.com/containers/storage v1.45.4
|
github.com/containers/storage v1.45.4
|
||||||
|
4
go.sum
4
go.sum
@ -212,8 +212,8 @@ github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ
|
|||||||
github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
|
github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
|
||||||
github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM=
|
github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM=
|
||||||
github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8=
|
github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8=
|
||||||
github.com/containers/common v0.51.0 h1:Ax4YHNTG8cEPHZJcMYRoP7sfBgOISceeyOvmZzmSucg=
|
github.com/containers/common v0.51.1 h1:xMQpFSuUovZgPRWJu1+uBixKsPcRrD4aHADkouz2K9Q=
|
||||||
github.com/containers/common v0.51.0/go.mod h1:3W2WIdalgQfrsX/T5tjX+6CxgT3ThJVN2G9sNuFjuCM=
|
github.com/containers/common v0.51.1/go.mod h1:3W2WIdalgQfrsX/T5tjX+6CxgT3ThJVN2G9sNuFjuCM=
|
||||||
github.com/containers/image/v5 v5.24.2-0.20230215091257-15e211694ae5 h1:dK2J9LpNl52JobfNRkPRAJhc94MJVXaND6s+14qxV6E=
|
github.com/containers/image/v5 v5.24.2-0.20230215091257-15e211694ae5 h1:dK2J9LpNl52JobfNRkPRAJhc94MJVXaND6s+14qxV6E=
|
||||||
github.com/containers/image/v5 v5.24.2-0.20230215091257-15e211694ae5/go.mod h1:TvwOWxKwwjsvu/T/5hdAOOCYxl2tXTOA+6qnhZmVAnc=
|
github.com/containers/image/v5 v5.24.2-0.20230215091257-15e211694ae5/go.mod h1:TvwOWxKwwjsvu/T/5hdAOOCYxl2tXTOA+6qnhZmVAnc=
|
||||||
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA=
|
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA=
|
||||||
|
24
vendor/github.com/containers/common/pkg/auth/auth.go
generated
vendored
24
vendor/github.com/containers/common/pkg/auth/auth.go
generated
vendored
@ -19,6 +19,23 @@ import (
|
|||||||
terminal "golang.org/x/term"
|
terminal "golang.org/x/term"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// ErrNewCredentialsInvalid means that the new user-provided credentials are
|
||||||
|
// not accepted by the registry.
|
||||||
|
type ErrNewCredentialsInvalid struct {
|
||||||
|
underlyingError error
|
||||||
|
message string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error returns the error message as a string.
|
||||||
|
func (e ErrNewCredentialsInvalid) Error() string {
|
||||||
|
return e.message
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unwrap returns the underlying error.
|
||||||
|
func (e ErrNewCredentialsInvalid) Unwrap() error {
|
||||||
|
return e.underlyingError
|
||||||
|
}
|
||||||
|
|
||||||
// GetDefaultAuthFile returns env value REGISTRY_AUTH_FILE as default
|
// GetDefaultAuthFile returns env value REGISTRY_AUTH_FILE as default
|
||||||
// --authfile path used in multiple --authfile flag definitions
|
// --authfile path used in multiple --authfile flag definitions
|
||||||
// Will fail over to DOCKER_CONFIG if REGISTRY_AUTH_FILE environment is not set
|
// Will fail over to DOCKER_CONFIG if REGISTRY_AUTH_FILE environment is not set
|
||||||
@ -143,6 +160,7 @@ func Login(ctx context.Context, systemContext *types.SystemContext, opts *LoginO
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err = docker.CheckAuth(ctx, systemContext, username, password, registry); err == nil {
|
if err = docker.CheckAuth(ctx, systemContext, username, password, registry); err == nil {
|
||||||
|
if !opts.NoWriteBack {
|
||||||
// Write the new credentials to the authfile
|
// Write the new credentials to the authfile
|
||||||
desc, err := config.SetCredentials(systemContext, key, username, password)
|
desc, err := config.SetCredentials(systemContext, key, username, password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -152,13 +170,15 @@ func Login(ctx context.Context, systemContext *types.SystemContext, opts *LoginO
|
|||||||
fmt.Fprintln(opts.Stdout, "Used: ", desc)
|
fmt.Fprintln(opts.Stdout, "Used: ", desc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err == nil {
|
|
||||||
fmt.Fprintln(opts.Stdout, "Login Succeeded!")
|
fmt.Fprintln(opts.Stdout, "Login Succeeded!")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if unauthorized, ok := err.(docker.ErrUnauthorizedForCredentials); ok {
|
if unauthorized, ok := err.(docker.ErrUnauthorizedForCredentials); ok {
|
||||||
logrus.Debugf("error logging into %q: %v", key, unauthorized)
|
logrus.Debugf("error logging into %q: %v", key, unauthorized)
|
||||||
return fmt.Errorf("logging into %q: invalid username/password", key)
|
return ErrNewCredentialsInvalid{
|
||||||
|
underlyingError: err,
|
||||||
|
message: fmt.Sprintf("logging into %q: invalid username/password", key),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return fmt.Errorf("authenticating creds for %q: %w", key, err)
|
return fmt.Errorf("authenticating creds for %q: %w", key, err)
|
||||||
}
|
}
|
||||||
|
1
vendor/github.com/containers/common/pkg/auth/cli.go
generated
vendored
1
vendor/github.com/containers/common/pkg/auth/cli.go
generated
vendored
@ -26,6 +26,7 @@ type LoginOptions struct {
|
|||||||
Stdin io.Reader // set to os.Stdin
|
Stdin io.Reader // set to os.Stdin
|
||||||
Stdout io.Writer // set to os.Stdout
|
Stdout io.Writer // set to os.Stdout
|
||||||
AcceptUnspecifiedRegistry bool // set to true if allows login with unspecified registry
|
AcceptUnspecifiedRegistry bool // set to true if allows login with unspecified registry
|
||||||
|
NoWriteBack bool // set to true to not write the credentials to the authfile/cred helpers
|
||||||
}
|
}
|
||||||
|
|
||||||
// LogoutOptions represents the results for flags in logout
|
// LogoutOptions represents the results for flags in logout
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -50,7 +50,7 @@ github.com/containerd/cgroups/stats/v1
|
|||||||
## explicit; go 1.19
|
## explicit; go 1.19
|
||||||
github.com/containerd/stargz-snapshotter/estargz
|
github.com/containerd/stargz-snapshotter/estargz
|
||||||
github.com/containerd/stargz-snapshotter/estargz/errorutil
|
github.com/containerd/stargz-snapshotter/estargz/errorutil
|
||||||
# github.com/containers/common v0.51.0
|
# github.com/containers/common v0.51.1
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
github.com/containers/common/pkg/auth
|
github.com/containers/common/pkg/auth
|
||||||
github.com/containers/common/pkg/capabilities
|
github.com/containers/common/pkg/capabilities
|
||||||
|
Loading…
Reference in New Issue
Block a user