Comments (10)
Seems related: googleapis/google-auth-library-python#217
from gcsfs.
The "service" route does already have the scopes set ( https://github.com/dask/gcsfs/blob/master/gcsfs/core.py#L370 ), but - shooting in the dark here - I can add it also to the file-based auth. I wouldn't have thought that made a difference, but you could try git+https://github.com/martindurant/gcsfs@scoped
. If not, it would be useful to know via pdb
what fs.method
ended up as.
from gcsfs.
Ok, I will try that branch later today or tomorrow.
Do you recommend a different method of authentication?
from gcsfs.
If you have a .json file, you can always pass that directly to the constructor GCSFileSystem(token='/path/to/file.json', project='my-project')
, and should also explicitly give the appropriate project=
.
In the past, google-default and cloud auth mechanisms have worked without problem. If you give no indication to GCSFileSystem
at all, it will try the various methods in turn, and it seems that something apparently gave no error (some auth was found), but the auth was actually incomplete. Or something. I would expect token='cloud'
to be the smoothest method on GCE.
from gcsfs.
I am not on GCE. I am on pleiades.
I will try passing the token explicity.
from gcsfs.
It looks like specifying the token='/path/to/file.json'
works. Sorry for the clutter.
However, it would be great if gcsfs would read the GOOGLE_APPLICATION_CREDENTIALS
environment variable and use this to fill in token
. I could try to put together a PR for this if you wish.
from gcsfs.
That's an impressive cluster!
I agree that GOOGLE_APPLICATION_CREDENTIALS
should be respected, but I am surprised that gauth.default()
doesn't pick this up already. Your original point about providing a more sensible error message, preferably when connecting as opposed to the first usage, still stands - but I am not sure how to achieve this.
from gcsfs.
OK, so what I understand is that google.auth.default()
is supposed to respect GOOGLE_APPLICATION_CREDENTIALS
, but "old" credentials can be missing scopes and/or project identifiers. Perhaps google.cloud.storage.Client knows how to deal with that. I can add the scopes to the default credentials, which apparently will use them "if necessary" - doesn't actually seem to make any difference to me.
from gcsfs.
I just created / downloaded the credentials yesterday. How can they be "old" already?
from gcsfs.
I just created / downloaded the credentials yesterday. How can they be "old" already?
I don't know :( It's hard to try to say what the google auth library actually did for your case.
from gcsfs.
Related Issues (20)
- _put_file does not allow to specify content encoding HOT 4
- __init__() got multiple values for keyword argument 'listings_expiry_time' HOT 1
- Is there already a way to list metadata attributes? HOT 2
- gcsfs: Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object HOT 3
- Inconsistent `STORAGE_EMULATOR_HOST` format HOT 2
- GCSFileSystem does not accept token, file.json or instance of service credentials HOT 13
- Errors when deleting a directory with huge number of files HOT 13
- The info object in GCSFS does not have mtime/ctime HOT 2
- `find` performance regression HOT 4
- Stale cache info leading to failing isfile check HOT 2
- _find does not support maxdepth
- GCS High Performance Parallel Listing
- Strange behavior with `HTTPError` and multiprocessing HOT 3
- isdir/info method works incorrectly HOT 20
- Clarify how to pass JSON credentials HOT 2
- Is it needed to be so strict about dependency on fsspec HOT 1
- Release 2023.10.0 and consider relaxing fsspec dependency HOT 3
- Error when listing large directory with versions=True
- Request: add chmod
- Issues when using identity_pool.Credentials for connecting GCSFileSystem HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gcsfs.