LoginSignup
1
3

More than 5 years have passed since last update.

GoogleAPIsをMacローカル環境のDefault Credential(key指定なし)でアプリケーション上で使うやりかた

Posted at

背景

  • ローカル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.

参考

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3