Warm tip: This article is reproduced from stackoverflow.com, please click
gcloud gsutil python

couldn't sync local folder to gcloud

发布于 2020-04-16 12:01:28

Goal : To sync the local machine directory to the gcloud bucket.

I have authenticated with the service account using the key file and even check the auth using gcloud auth list but wasn't able to sync the file using gsutil rsync -r data gs://mybucket/data . I have attached the screenshot of the error. enter image description here

PS: Dont link the issue to another issues. I have tried all the possible way and have went those lots of git and stack pages and still couldn't find a solution.

Questioner
Sai Krishnadas
Viewed
41
Sai Krishnadas 2020-02-04 14:42

(*)After the authentication of the service account : gcloud auth activate-service-account [ACCOUNT] --key-file=KEY_FILE

(*)Activate the account: glcoud auth list and activate the account with following code that was shown below.

(*)config the gsutil : gsutil config

(*)Provide the authentication code

This worked for me.