Skip to content

Commit c8a9c63

Browse files
committed
🚧 Prototype gke and style fixed
1 parent 2fabb16 commit c8a9c63

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ require (
9191
)
9292

9393
require (
94+
cloud.google.com/go v0.81.0 // indirect
9495
github.com/fsnotify/fsnotify v1.5.4 // indirect
9596
github.com/inconshreveable/mousetrap v1.0.1 // indirect
9697
github.com/mattn/go-isatty v0.0.16

go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKP
2121
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
2222
cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
2323
cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
24+
cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8=
2425
cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
2526
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
2627
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=

pkg/oci/authn/client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ import (
2020
"net/http"
2121
"time"
2222

23+
"golang.org/x/oauth2"
2324
"golang.org/x/oauth2/clientcredentials"
25+
"golang.org/x/oauth2/google"
2426
"oras.land/oras-go/v2/registry/remote"
2527
"oras.land/oras-go/v2/registry/remote/auth"
2628
)
@@ -45,6 +47,9 @@ func NewClient(options ...func(*Options)) remote.Client {
4547
o(opt)
4648
}
4749

50+
ts := google.ComputeTokenSource("")
51+
return oauth2.NewClient(opt.Ctx, ts)
52+
4853
if opt.Oauth && opt.ClientCredentials != nil {
4954
return opt.ClientCredentials.Client(opt.Ctx)
5055
} else {

0 commit comments

Comments
 (0)