回答編集履歴
1
コメントに対する内容を追記
answer
CHANGED
@@ -7,4 +7,24 @@
|
|
7
7
|
認証の開始 | Google Cloud
|
8
8
|
[https://cloud.google.com/docs/authentication/getting-started?hl=ja#verifying_authentication](https://cloud.google.com/docs/authentication/getting-started?hl=ja#verifying_authentication)
|
9
9
|
|
10
|
-
3.上記で問題なければ、ロガーを使ってエラー箇所を特定する。
|
10
|
+
3.上記で問題なければ、ロガーを使ってエラー箇所を特定する。
|
11
|
+
|
12
|
+
追記(2020/3/6)
|
13
|
+
---
|
14
|
+
|
15
|
+
> しかし認証情報が書かれている***.jsonをgithubにプッシュするわけにはいかないため、どのようにheroku上でファイルを指定してあげればいいのかがわかっていない状態です。。。
|
16
|
+
|
17
|
+
以下の認証方法を試してみてください。
|
18
|
+
|
19
|
+
> 2.環境変数が設定されていない場合、ADC では、サービスで実行されているアプリケーションに応じて、Compute Engine、Kubernetes Engine、Cloud Run、App Engine、または Cloud Functions によって提供されているデフォルトのサービス アカウントを使用します。
|
20
|
+
|
21
|
+
サーバー間での本番環境アプリケーションの認証の設定 | Google Cloud
|
22
|
+
[https://cloud.google.com/docs/authentication/production](https://cloud.google.com/docs/authentication/production)
|
23
|
+
|
24
|
+
|
25
|
+
※スタックオーバーフローに類似の質問がありましたので、参考にしてください。
|
26
|
+
|
27
|
+
google cloud platform - GOOGLE_APPLICATION_CREDENTIALS contents not file path - Stack Overflow
|
28
|
+
[https://stackoverflow.com/questions/49318273/google-application-credentials-contents-not-file-path](https://stackoverflow.com/questions/49318273/google-application-credentials-contents-not-file-path)
|
29
|
+
|
30
|
+
もし上記で解決できないのであれば、外部ストレージから json を読み込むしかないかもしれませんね。
|