背景
- ローカルMacの開発でrails環境上からgoogle-cloud-ruby を使いたい
- gcloud auth login(詳細)しているのにapi使おうとすると認証エラー
- APIも有効にしたし、ユーザー権限も付与しているのになぜか認証エラー出る
- service accountの設定とかはちょっと面倒
やって見る価値あるかも
gcloud auth application-default login
公式docより
If you have installed the Google Cloud SDK on your machine and have run the command gcloud auth application-default login, your identity can be used as a proxy to test code calling APIs from that machine.