tropicbirdのブログ

備忘録です。

GCPで立てたVMにGCSの認証を有効にする方法 解決法⇒ ResumableUploadAbortException: 403 Provided scope(s) are not authorized

エラーメッセージ

ResumableUploadAbortException: 403 Provided scope(s) are not authorized

が出る原因はVMに対してGCSの認証がうまくできていなかったため。
対処方法は以下の通り。

VMのターミナル上で

gcloud init

とし、

Choose the account you would like to use to perform operations for 
this configuration:
 [1] XXXXXXXXXX-compute@developer.gserviceaccount.com
 [2] Log in with a new account
Please enter your numeric choice:

の選択画面で2を選択して既存のGCPのプロジェクトでログインする。

↓ソース
cloud.google.com