Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

firebase-deploy don't use project_id in KEY_FILE


When using KEY_FILE option, service account key file includes project_id, but firebase-deploy doesn't seem to use it. So we have to specify PROJECT_ID independently.


2 answers

0 votes

@MasaGon actually you may not specify the project. It is good practise to specify the project you want to deploy to in .firebaserc file and this option is also available in firebase-deploy pipe.

Regarding key file, it is used for authentication and just confirms that you can deploy to the exact project.

.filebaserc may have multiple projects like this. So, detecting project with KEY_FILE is the most reasonable way when using KEY_FILE, I think.


  "projects": {

    "default": "some-project1",

    "development": "some-project2",

    "staging": "some-project3",

    "production": "some-project4"




@MasaGon yes, KEY_FILE is used to authenticate as well as FIREBASE_TOKEN, and need to be generated on gcp site as key for service role with appropriate permissions, you can also specify there which project may be accessed.


Explain if you have another format for this authentication and want to use key file for  specific project id, so if you specify another project, it will fail with 403 forbidden error?

Or do you have another need for your pipeline?


Best regards, Galyna

KEY_FILE format is like this. You can see project_id is included. So I don't understand why you have to specify PROJECT_ID separately. We use multiple project for each production, staging and development environment. On some case, deployment is failed without PROJECT_ID. I think PROJECT_ID is unnecessary when KEY_FILE is specified.

"type": "service_account",
"project_id": "******************",
"private_key_id": "******************",
"private_key": "-----BEGIN PRIVATE KEY-----*****************-----END PRIVATE KEY-----\n",
"client_email": "***************",
"client_id": "***************",
"auth_uri": "",
"token_uri": "",
"auth_provider_x509_cert_url": "",
"client_x509_cert_url": "*******************"


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,440 views 4 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you