Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why doesn't gcsfs allow projects different from the default project in google_default? #483

Open
yokomotod opened this issue Jul 22, 2022 · 0 comments

Comments

@yokomotod
Copy link

With account which has $ gcloud config get-value project # => project-a,

fs = gcsfs.GCSFileSystem(project='project-b')

raise validation error:

ValueError: User-provided project 'project-b' does not match the google default project 'project-a'. Either

  1. Accept the google-default project by not passing a `project` to GCSFileSystem
  2. Configure the default project to match the user-provided project (gcloud config set project)
  3. Use an authorization method other than 'google_default' by providing 'token=...'

However, I do want to use another project. Why gcsfs doesn't allow this?

My google_default account has correct permission to access project-b so it's no problem to access from the account. (I believe the account's default project doesn't matter.)

For option2, I use multiple fs objects for multiple projects with single google_default account, so I can't switch default project (gcloud config set project) to match.

For option3, I would like to use the Application Default Credential mechanism to make it work conveniently both on cloud and local.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant