Hi,
I’m trying to create a site using the CLI and the Github App. I’ve created a team, installed the Github App in my Github org and gave access to a repo which I created from the astro starter template.
I cloned the repo locally and when running netlify init
, I get that question Netlify CLI needs access to your GitHub account to configure Webhooks and Deploy Keys. What would you like to do?
.
The issue is the CLI does not seem to recognize the Github App if I select Authorize with GitHub through app.netlify.com
, it instead offers to create an oauth app which I don’t want to use because of the lack of repo scoping.
When taking the second option Authorize with a GitHub personal access token
, I get a 403 on a post method to add the deploy key + the following error message Error: Failed adding GitHub deploy key with error: Resource not accessible by personal access token - https://docs.github.com/rest/deploy-keys/deploy-keys#create-a-deploy-key
. Even though the site gets created and the key added.
Why can’t I create a site leveraging the existing Github App?
I was hoping to do this programmatically. But it’s maybe not possible.
Cheers