Mount Google bucket to Mac

Post author
Peter van Galen

While it is not officially supported, I was able to mount a Google bucket to my Mac using gcsfuse. First I followed gsutil installation instructions from the article "Moving data between local storage and workspace bucket" (I am working remotely and had to disconnect from the Broad VPN for the gcloud init step). After I got gsutil to work locally, I set out to mount a bucket. Unfortunately, the brew installation of gcsfuse was discontinued in July 2021, so I followed the steps from the "Building from source" section here:

1. Install dependency Go using these instructions

2. Install dependency osxfuse using "brew install --cask osxfuse". I had to go to System Preferences/Security & Privacy/ and "Allow", and needed to run "brew reinstall --cask osxfuse". In the end, the System Preferences had new icons for FUSE and macFUSE at the bottom.

3. I already had git installed.

4. Install gcsfuse using as follows:

GO111MODULE=auto go get -u

5. Add "export PATH="$PATH:$HOME/go/bin" to ~/.zshrc (my local terminal runs zsh). Open a new terminal window.

Now I can mount a bucket as follows:

mkdir ~/gcsfuse
export GOOGLE_APPLICATION_CREDENTIALS="/Users/username/.config/gcloud/legacy_credentials/"
gcsfuse --implicit-dirs <BUCKET> ~/gcsfuse
open ~/gcsfuse

# Unmount
umount ~/gcsfuse

I hope this helps someone.


1 comment

  • Comment author
    Jason Cerrato

    Thank you for detailing this so clearly, Peter! This will be very helpful for Terra users.


Please sign in to leave a comment.