環境変数

GOOGLE_APPLICATION_CREDENTIALS

型string

Google Cloud's Agent Platform の認証に使用される GCP 認証情報構成ファイル(サービスアカウントキーまたはワークロードアイデンティティフェデレーション構成)のパス。

使い方・用途

  • Google Cloud の Agent Platform を利用する際に、サービスアカウントキーまたは Workload Identity Federation の認証情報構成ファイルを指定して認証させたい。
  • CI 環境などで gcloud auth application-default login を実行できない場合に、サービスアカウントキーファイルのパスを指定して認証を通したい。
  • 'Could not load the default credentials' や Google Cloud 認証情報の期限切れ (401) のエラーが発生した際に、有効な認証情報ファイルを指すようにして解消したい。
英語原文(公式ドキュメントより)

Path to a GCP credential configuration file (service account key or workload identity federation config) used for Google Cloud's Agent Platform authentication. See https://code.claude.com/docs/en/google-vertex-ai#3-configure-gcp-credentials

関連する変更履歴

v2.1.261(1件)

Improved
GOOGLE_APPLICATION_CREDENTIALS が設定されている場合の Google Vertex AI での起動を改善し、API クライアントの作成時に Google Cloud プロジェクトの検出を再実行したり、余分な gcloud プロセスを起動したりしないようにした。
英語原文を表示
Improved startup on Google Vertex AI when GOOGLE_APPLICATION_CREDENTIALS is set: API client creation no longer re-runs Google Cloud project discovery or spawns extra gcloud processes

変更後

GOOGLE_APPLICATION_CREDENTIALS を設定して Google Vertex AI 経由で Claude Code を使う際、起動時の API クライアント生成が高速になり、余分な gcloud プロセスが実行されなくなる。

関連ドキュメント