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

Enable usage on Github Enterprise #517

Closed
mzuehlke opened this issue Jul 10, 2023 · 2 comments · Fixed by #520
Closed

Enable usage on Github Enterprise #517

mzuehlke opened this issue Jul 10, 2023 · 2 comments · Fixed by #520

Comments

@mzuehlke
Copy link
Member

mzuehlke commented Jul 10, 2023

I am trying to get this action running on an on-prem Github Enterprise.
Till know I encountered 2 bugs that prevented it from working.

  1. Encode newlines as "\n" in key
  2. Github API URL is not used in gitHubAppToken

I am trying to come with a PR for this 😄

@alejandrohdezma
Copy link
Member

For (2.) you need to provide the API URL to the function and then override request and provide the URL there:

createAppAuth({
  appId: 1,
  privateKey: "-----BEGIN PRIVATE KEY-----\n...",
  request: request.defaults({
    baseUrl: "https://ghe.my-company.com/api/v3",
  }),
});

Reference: https://github.com/octokit/auth-app.js/#createappauthoptions-or-new-octokit-auth-

@mzuehlke
Copy link
Member Author

Thanks for the hint, I found exactly the same snippet and with that I got it working 😄
I have to tidy the code a bit before creating a PR.

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

Successfully merging a pull request may close this issue.

2 participants