Skip to content

Commit 0e2f2bc

Browse files
authored
Fix gcs Anonymous user issue because none token (#38102)
1 parent 3c5bcaa commit 0e2f2bc

File tree

1 file changed

+1
-2
lines changed
  • airflow/providers/google/cloud/fs

1 file changed

+1
-2
lines changed

airflow/providers/google/cloud/fs/gcs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,11 @@ def get_fs(conn_id: str | None, storage_options: dict[str, str] | None = None) -
4747
return GCSFileSystem()
4848

4949
g = GoogleBaseHook(gcp_conn_id=conn_id)
50-
creds = g.get_credentials()
5150

5251
options = {
5352
"project": g.project_id,
5453
"access": g.extras.get(GCS_ACCESS, "full_control"),
55-
"token": creds.token,
54+
"token": g._get_access_token(),
5655
"consistency": g.extras.get(GCS_CONSISTENCY, "none"),
5756
"cache_timeout": g.extras.get(GCS_CACHE_TIMEOUT),
5857
"requester_pays": g.extras.get(GCS_REQUESTER_PAYS, False),

0 commit comments

Comments
 (0)