0
votes

I want to fuse a local directory with a google cloud bucket with the following command:

gcsfuse gs://stereo-train ~/Documents/stereo-train

However, I'm getting the following error:

Opening GCS connection...
daemonize.Run: readFromProcess: sub-process: mountWithArgs: getConn: DefaultTokenSource: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.

I already have the GOOGLE_APPLICATION_CREDENTIALS set and have already logged on using gcloud auth login.

What's the cause of this error and how can I fix it?

1
What is your OS? can you perform a echo $GOOGLE_APPLICATION_CREDENTIALS? Paste the result in your question. Can you perform ` gcloud auth application-default print-access-token` and say if the command works?guillaume blaquiere
macOS. For the first command I see the location of the credentials json. Yes the second command works and I see a random string.zendevil
Sorry, I don't know, I don't have mac and your config seems good!guillaume blaquiere

1 Answers

0
votes

You can try mounting fuse specifying the json key , also make sure that you mount fuse using the same user that will be accesing the files, if you mount it with root and then try accessing without root an issue like this may appear.

If this is still not working, you can use the debug flags while mounting to get more information to work with

$ gcsfuse --foreground --debug_gcs --debug_fuse my-bucket /path/to/mount