From 16a475792159b9f6b658693aa6e4741b13918755 Mon Sep 17 00:00:00 2001 From: Robert van Gent Date: Sat, 16 Sep 2023 09:52:57 -0700 Subject: [PATCH] blob/gcsblob: Use less-empty creds for unauthenticated mode. (#3317) --- blob/gcsblob/gcsblob.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blob/gcsblob/gcsblob.go b/blob/gcsblob/gcsblob.go index f8e61827c1..452edd39cc 100644 --- a/blob/gcsblob/gcsblob.go +++ b/blob/gcsblob/gcsblob.go @@ -163,7 +163,7 @@ func (o *lazyCredsOpener) OpenBucketURL(ctx context.Context, u *url.URL) (*blob. fmt.Printf("Warning: unable to load GCP Default Credentials: %v", err) // Use empty credentials, in case the user isn't going to actually use // them; e.g., getting signed URLs with GoogleAccessID=-. - creds = &google.Credentials{} + creds, _ = google.CredentialsFromJSON(ctx, []byte(`{"type": "service_account"}`)) } // Populate default values from credentials files, where available.