googleapis / googleapis/google-cloud-java

[java-firestore] use Emulator with Firestore without credentials

オープン
#13,141 コメント 6 件 リアクション 1 件 担当者 1 名 @athakor が担当を希望しています GitHub で見る
api: firestore type: question
主要言語
Java
スター
2.1k
フォーク
1.2k
平均マージ
1日 23時間
マージ済み PR(30日)
154

説明

Hi

based on the existing issues on the repo and the latest 2.0.0 release i understand that its suppose to be possible to connect to the FireStore emulator without providing a real credentials, as its not really needed.

i've tried to do the following

Firestore FS = FirestoreOptions.getDefaultInstance().toBuilder()
.setProjectId("test")
.setHost("localhost:8888")
.setCredentials(EmulatorCredentials())
.setCredentialsProvider(FixedCredentialsProvider.create(EmulatorCredentials()))
.build()
.getService();

using the latest 2.0.0 java-cloud-firestore.
but, it doesnt seems working and i still get the exception that asks me to provide GOOGLE_APPLICATION_CREDENTIALS.

what am i missing?

i also saw there was another merge on that area, and the additional .setEmulatorHost to the FireStoreOptions but it was not yet published.

thanks,
Chen

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。