Skip to content

Commit

Permalink
WIP: use ecr-login PR
Browse files Browse the repository at this point in the history
  • Loading branch information
imjasonh committed Feb 16, 2022
1 parent 0187841 commit 4059872
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 17 deletions.
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/google/ko

go 1.16

replace github.com/awslabs/amazon-ecr-credential-helper/ecr-login => github.com/imjasonh/amazon-ecr-credential-helper/ecr-login v0.0.0-20220214192614-7ea3aa61cf70

require (
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20211215200129-69c85dc22db6
github.com/chrismellard/docker-credential-acr-env v0.0.0-20220119192733-fe33c00cee21
Expand All @@ -11,7 +13,7 @@ require (
github.com/fsnotify/fsnotify v1.5.1
github.com/go-training/helloworld v0.0.0-20200225145412-ba5f4379d78b
github.com/google/go-cmp v0.5.7
github.com/google/go-containerregistry v0.8.1-0.20220207182237-33725d2d7add
github.com/google/go-containerregistry v0.8.1-0.20220209165246-a44adc326839
github.com/mattmoor/dep-notify v0.0.0-20190205035814-a45dec370a17
github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198
github.com/sigstore/cosign v1.3.2-0.20211120003522-90e2dcfe7b92
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,8 @@ github.com/google/go-containerregistry v0.5.2-0.20210609162550-f0ce2270b3b4/go.m
github.com/google/go-containerregistry v0.7.0/go.mod h1:2zaoelrL0d08gGbpdP3LqyUuBmhWbpD6IOe2s9nLS2k=
github.com/google/go-containerregistry v0.8.1-0.20220207182237-33725d2d7add h1:Gi4bYe7LTB8l0DLX/22/2MaLQx7GMoDs4KjHEUc48vU=
github.com/google/go-containerregistry v0.8.1-0.20220207182237-33725d2d7add/go.mod h1:cwx3SjrH84Rh9VFJSIhPh43ovyOp3DCWgY3h8nWmdGQ=
github.com/google/go-containerregistry v0.8.1-0.20220209165246-a44adc326839 h1:7PunQZxMao2q43If8gKj1JFRzapmhgny9NWwXY4PGa4=
github.com/google/go-containerregistry v0.8.1-0.20220209165246-a44adc326839/go.mod h1:cwx3SjrH84Rh9VFJSIhPh43ovyOp3DCWgY3h8nWmdGQ=
github.com/google/go-containerregistry/pkg/authn/k8schain v0.0.0-20211102215614-dd49079bb93d/go.mod h1:j3IqhBG3Ox1NXmmhbWU4UmiHVAf2dUgB7le1Ch7JZQ0=
github.com/google/go-github/v27 v27.0.6/go.mod h1:/0Gr8pJ55COkmv+S/yPKCczSkUPIM/LnFyubufRNIS0=
github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM=
Expand Down Expand Up @@ -1161,6 +1163,12 @@ github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ
github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imjasonh/amazon-ecr-credential-helper/ecr-login v0.0.0-20211215200129-69c85dc22db6 h1:fTKrtHAfEvo9AK3epgX3hzgSoHRfY5QSeSL0Tv4NCj4=
github.com/imjasonh/amazon-ecr-credential-helper/ecr-login v0.0.0-20211215200129-69c85dc22db6/go.mod h1:8vJsEZ4iRqG+Vx6pKhWK6U00qcj0KC37IsfszMkY6UE=
github.com/imjasonh/amazon-ecr-credential-helper/ecr-login v0.0.0-20220209144750-01cd7428a572 h1:5jiIBRxVVdZD1ZZYSf4gocMD4Q0pUnuN6KZH/WoYmUM=
github.com/imjasonh/amazon-ecr-credential-helper/ecr-login v0.0.0-20220209144750-01cd7428a572/go.mod h1:8vJsEZ4iRqG+Vx6pKhWK6U00qcj0KC37IsfszMkY6UE=
github.com/imjasonh/amazon-ecr-credential-helper/ecr-login v0.0.0-20220214192614-7ea3aa61cf70 h1:l82PqyZXxsNCMYnHqZjbw8WmFsjE+QUvNTlESdLcAyA=
github.com/imjasonh/amazon-ecr-credential-helper/ecr-login v0.0.0-20220214192614-7ea3aa61cf70/go.mod h1:8vJsEZ4iRqG+Vx6pKhWK6U00qcj0KC37IsfszMkY6UE=
github.com/in-toto/in-toto-golang v0.2.1-0.20210627200632-886210ae2ab9/go.mod h1:Skbg04kmfB7IAnEIsspKPg/ny1eiFt/TgPr9SDCHusA=
github.com/in-toto/in-toto-golang v0.3.3/go.mod h1:dbXecHGZSqRubmm5TXtvDSZT5JyaKD7ebVTiC2aMLWY=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
Expand Down
6 changes: 3 additions & 3 deletions pkg/commands/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ package commands
import (
"context"
"fmt"
"io/ioutil"
"log"
"os"
"strconv"
"strings"
"time"

ecr "github.com/awslabs/amazon-ecr-credential-helper/ecr-login"
"github.com/awslabs/amazon-ecr-credential-helper/ecr-login/api"
"github.com/chrismellard/docker-credential-acr-env/pkg/credhelper"
"github.com/google/go-containerregistry/pkg/authn"
"github.com/google/go-containerregistry/pkg/authn/github"
Expand All @@ -42,13 +42,13 @@ import (
)

var (
amazonKeychain authn.Keychain = authn.NewKeychainFromHelper(ecr.ECRHelper{ClientFactory: api.DefaultClientFactory{}})
amazonKeychain authn.Keychain = authn.NewKeychainFromHelper(ecr.NewECRHelper(ecr.WithLogOutput(ioutil.Discard)))
azureKeychain authn.Keychain = authn.NewKeychainFromHelper(credhelper.NewACRCredentialsHelper())
keychain = authn.NewMultiKeychain(
amazonKeychain,
authn.DefaultKeychain,
google.Keychain,
github.Keychain,
amazonKeychain,
azureKeychain,
)
)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ github.com/aws/smithy-go/time
github.com/aws/smithy-go/transport/http
github.com/aws/smithy-go/transport/http/internal/io
github.com/aws/smithy-go/waiter
# github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20211215200129-69c85dc22db6
# github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20211215200129-69c85dc22db6 => github.com/imjasonh/amazon-ecr-credential-helper/ecr-login v0.0.0-20220214192614-7ea3aa61cf70
## explicit
github.com/awslabs/amazon-ecr-credential-helper/ecr-login
github.com/awslabs/amazon-ecr-credential-helper/ecr-login/api
Expand Down Expand Up @@ -190,7 +190,7 @@ github.com/google/go-cmp/cmp/internal/diff
github.com/google/go-cmp/cmp/internal/flags
github.com/google/go-cmp/cmp/internal/function
github.com/google/go-cmp/cmp/internal/value
# github.com/google/go-containerregistry v0.8.1-0.20220207182237-33725d2d7add
# github.com/google/go-containerregistry v0.8.1-0.20220209165246-a44adc326839
## explicit
github.com/google/go-containerregistry/cmd/crane/cmd
github.com/google/go-containerregistry/internal/and
Expand Down Expand Up @@ -482,3 +482,4 @@ sigs.k8s.io/kind/pkg/internal/env
sigs.k8s.io/kind/pkg/log
# sigs.k8s.io/yaml v1.3.0
sigs.k8s.io/yaml
# github.com/awslabs/amazon-ecr-credential-helper/ecr-login => github.com/imjasonh/amazon-ecr-credential-helper/ecr-login v0.0.0-20220214192614-7ea3aa61cf70

0 comments on commit 4059872

Please sign in to comment.