diff --git a/internal/vfs/gcsfs.go b/internal/vfs/gcsfs.go index eb691624..a1b15f97 100644 --- a/internal/vfs/gcsfs.go +++ b/internal/vfs/gcsfs.go @@ -86,7 +86,9 @@ func NewGCSFs(connectionID, localTempDir, mountPath string, config GCSFsConfig) if err = fs.config.validate(); err != nil { return fs, err } - ctx := context.Background() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + if fs.config.AutomaticCredentials > 0 { fs.svc, err = storage.NewClient(ctx, storage.WithJSONReads(),