GCS Fuse allows you to mount a Google bucket as a file system. It’s similar to S3FS.

Setup repo

<pre lang="bash">
sudo tee /etc/yum.repos.d/gcsfuse.repo > /dev/null 
<p>Yum install</p>
<pre lang="bash">
sudo yum install gcsfuse

<p>For Ubuntu or Linux Mint, download the deb package.</p>
<pre lang="bash">
curl -L -O https://github.com/GoogleCloudPlatform/gcsfuse/releases/download/v0.39.2/gcsfuse_0.39.2_amd64.deb
sudo dpkg --install gcsfuse_0.39.2_amd64.deb
rm gcsfuse_0.39.2_amd64.deb

<p>Check if installed.</p>
<pre lang="bash">
gcsfuse -v

<pre lang="bash">
gcloud auth login
gcloud auth application-default login

<p>Setup mount.</p>
<pre lang="bash">
mkdir -p /path/to/mount
chown username:username /path/to/mount

<p>Mount it.</p>
<pre lang="bash">
gcsfuse my-bucket /path/to/mount

<p>Alternative using service account key.</p>
<pre lang="bash">
gcsfuse my-bucket /path/to/mount --key-file /root/key.json --uid=xxx --gid=xxx -o rw,allow_other 

<p>Automatic mount in /etc/fstab.</p>
<pre lang="bash">
my-bucket /path/to/mount gcsfuse _netdev,allow_other,user,rw,uid=1000,gid=1000 0 0

<pre lang="bash">
fusermount -u /path/to/mount