Firebase Demo Day is here!
Watch demos of how to build and grow AI-powered, full stack apps using the best of Google.
使用服務帳戶進行身份驗證
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
服務帳戶對於在 CI 環境中設定 App Distribution 非常有用。使用服務帳戶進行驗證可讓您使用客戶端程式庫(例如 Firebase CLI 或 fastlane)來分發您的建置。當您使用服務帳戶進行驗證時,Firebase 會使用應用程式預設憑證 (ADC)來尋找已套用的憑證,您可以透過設定GOOGLE_APPLICATION_CREDENTIALS
環境變數來提供該憑證。
- 開啟Google Cloud Console並選擇您的項目。
- 點擊建立服務帳戶並輸入服務帳戶詳細資料。
- 按一下「建立並繼續」 。
- 新增Firebase App Distribution Admin角色並點選Done 。
- 建立 JSON 私鑰並將金鑰移至建置環境可存取的位置。請務必將此文件保存在安全的地方,因為它授予管理員對 Firebase 專案中的 App Distribution 的存取權限。
- 如果您在 2019 年 9 月 20 日之後建立應用,請跳過此步驟:在 Google API 控制台中,啟用Firebase App Distribution API。出現提示時,選擇與您的 Firebase 專案同名的專案。
- 將環境變數
GOOGLE_APPLICATION_CREDENTIALS
設定為您的私鑰 JSON 檔案的路徑:
export GOOGLE_APPLICATION_CREDENTIALS=/absolute/path/to/credentials/file.json
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-11-23 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]