Nidhin Kumar
Nidhin Kumar

Reputation: 3579

How to push files to firebase storage using firebase cli

I have used firebase cli to host a website.Today i tried to push my files from my local machine to firebase storage using firebase cli but when i give the command firebase deploy nothing happened.can anyone tell me how to push my files to firebase storage.

Upvotes: 7

Views: 5707

Answers (1)

Daniel
Daniel

Reputation: 8667

Install gsutil using tutorial

https://cloud.google.com/storage/docs/gsutil_install#deb

Example for Ubuntu:

echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
apt-get install apt-transport-https ca-certificates -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update && sudo apt-get install google-cloud-sdk

Login to google cloud

gcloud auth login

Go to displayed link, login and paste verification code back to console. Select project

gcloud config set project PROJECT_ID

Send file. For example:

gsutil cp backup.$(date +%F).gz.gpg gs://PROJECT_ID.appspot.com/backups

Upvotes: 11

Related Questions