Login to firebase using gcloud service account

谁都会走 提交于 2020-06-27 18:49:57

问题


I have functions deployed to gcloud functions and i want to configure CI/CD for deploying this functions from gitlab. To do any operations from gitlab i need to get firebase auth token with

firebase login:ci

command.

The problem is that i need to get this token using gcloud service account, which is not displayed in browser, when i run

firebase login:ci

I have this service account data (project_id, private_key, private_key_id, etc.)

How should i authorize using this acc?


回答1:


If you set an environment variable called GOOGLE_APPLICATION_CREDENTIALS as a path pointing to your service account JSON file, the Firebase CLI will automatically pick that up and use it to authorize commands. You don't need to be logged in or provide a --token argument when this is the case.



来源:https://stackoverflow.com/questions/59053919/login-to-firebase-using-gcloud-service-account

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!