Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firebase hosting:github not reponding #5317

Closed
angelcervera opened this issue Dec 8, 2022 · 4 comments · Fixed by #5643
Closed

firebase hosting:github not reponding #5317

angelcervera opened this issue Dec 8, 2022 · 4 comments · Fixed by #5643

Comments

@angelcervera
Copy link

angelcervera commented Dec 8, 2022

[REQUIRED] Environment info

firebase-tools: 11.17.0

Platform: Distributor ID: Ubuntu 22.04.1 LTS

[REQUIRED] Test case

$ firebase init hosting:github

     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

You're about to initialize a Firebase project in this directory:

  /home/myusername/path_to_my_project/module

Before we get started, keep in mind:

  * You are initializing within an existing Firebase project directory


=== Project Setup

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add, 
but for now we'll just set up a default project.

i  Using project my_prj-xxxxx (my_prj)

=== Hosting:github Setup

i  Detected a .git folder at /home/myusername/path_to_my_project
i  Authorizing with GitHub to upload your service account to a GitHub repository's secrets store.

Visit this URL on this device to log in:
https://github.com/login/oauth/authorize?other_stuff_here

Waiting for authentication...

✔  Success! Logged into GitHub as myusername

? For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository) (ORG/my_prj) 

Pressing enter, it is filled with the right org/project. But no matter how many times press enter, it is stuck there.

[REQUIRED] Steps to reproduce

  1. I'm the org and repo owner, with admin permission.
  2. Run $ firebase init hosting:github
  3. Automatically login using the browser.
  4. All looks great and it automatically select the right repo.
  5. But I can not pass that point!

[REQUIRED] Expected behavior

Continue and finish the configuration?

[REQUIRED] Actual behavior

Every time I press enter, it show this debug information:

? For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository) (ORG/my_prj) [2022-12-08T18:24:25.694Z] >>> [apiv2][query] GET https://api.github.com/repos/ORG/my_prj/actions/secrets/public-key type=owner
⠹ For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository) (ORG/my_prj) ORG/my_prj[2022-12-08T18:24:25.992Z] <<< [apiv2][status] GET https://api.github.com/repos/ORG/my_prj/actions/secrets/public-key 404
[2022-12-08T18:24:25.993Z] <<< [apiv2][body] GET https://api.github.com/repos/ORG/my_prj/actions/secrets/public-key {"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/actions#get-a-repository-public-key"}
@angelcervera
Copy link
Author

angelcervera commented Dec 8, 2022

I think that the problem is:

  1. The documentation should reflect that it is necessary to add Firebase CLI app into the GitHub Apps (different way for orgs and personal repositories)
  2. Not sure it's possible to check it from the script and advise to enable it. But in any case, the cli should show an error and don't stay blocked and non responsive.

@ajGulati05
Copy link

Any update on this? I did not see a firebase-cli app on github

@jhuleatt jhuleatt self-assigned this Mar 7, 2023
@joehan joehan self-assigned this Mar 7, 2023
@bkendall
Copy link
Contributor

I've punted on this for quite some time and I'm sorry. Other things got in the way.

Looking at what it's calling (ORG/my_prj/actions/secrets/public-key), it seems as though the 404 coming back means that we are unable to get the public key for the repository. Their docs describe that the person must have read access to the repo, and if it's private, we must have the repo scope in order to access it.

@angelcervera I think you're right that having to add the Firebase CLI app would correctly set this up. I'll see if we can catch that type of error and bail out earlier as well.

@ChetanAhuja
Copy link

  • he documentation should reflect that it is necessary to add Firebase CLI app into the GitHub Apps (different way for orgs and personal repositories)

What does that even mean (addng Firebase CLI app into the GitHub Apps )? FWIW, I don't see any documentation mentioning this or how to do this operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants