Skip to content

401 Error on GitHub Enterprise Server due to missing baseUrl in Octokit #107

@uc4w6c

Description

@uc4w6c

Describe the bug
A 401 Unauthorized error occurs when running on GitHub Enterprise Server because the Octokit client is initialized without specifying a baseUrl. By default, Octokit targets https://api.github.com, which is not valid in GHE environments.

To Reproduce
Run the GitHub Action on a GitHub Enterprise Server instance.

Expected behavior
Octokit should make authenticated requests to the GitHub Enterprise Server's API endpoint when GITHUB_API_URL is provided.

Screenshots
N/A

Workflow yml file
N/A (This issue is related to runtime Octokit initialization, not the workflow file itself)

API Provider
[ ] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions