Skip to content

Commit

Permalink
fix: authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
project0 committed May 2, 2023
1 parent 2490389 commit 7109278
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
# - id: doctoc
# args: ['--title', '## Table of Contents']
- repo: https://github.com/golangci/golangci-lint
rev: a3336890904cd3efa4f1c7e3f82ce207fe125a6f # v1.46.2
rev: da04413a8a1eefb8c10161c9f2b558138d01815c # v1.52.2
hooks:
- id: golangci-lint
args: ['--timeout', '5m']
Expand Down
4 changes: 2 additions & 2 deletions pkg/backend/native.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func NewNative() *Native {
}

func (n *Native) newContext(creds Credentials) *ctypes.SystemContext {
// default is no creds
dockerAuth := &ctypes.DockerAuthConfig{}
// Needs to be nil to allow fallback to system given .docker/config.json
var dockerAuth *ctypes.DockerAuthConfig

if creds.Creds != "" {
username, password, _ := strings.Cut(creds.Creds, ":")
Expand Down
2 changes: 1 addition & 1 deletion pkg/backend/skopeo.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (s *Skopeo) Copy(ctx context.Context, srcRef ctypes.ImageReference, srcCred
}

args = append(args, s.credArgs(srcCreds, "src-")...)
args = append(args, s.credArgs(destCreds, "dst-")...)
args = append(args, s.credArgs(destCreds, "dest-")...)

log.Ctx(ctx).
Trace().
Expand Down

0 comments on commit 7109278

Please sign in to comment.