0

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?

Andrew Gaul
  • 2,296
  • 1
  • 12
  • 19
zendevil
  • 899
  • 4
  • 13
  • 26
  • 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 Aug 17 '20 at 07:55
  • 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 Aug 17 '20 at 14:38
  • Sorry, I don't know, I don't have mac and your config seems good! – guillaume blaquiere Aug 17 '20 at 18:49

2 Answers2

0

Try to login again

gcloud auth application-default login
Alan Tang
  • 31
  • 9
-1

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
Andres S
  • 1,168
  • 7
  • 11