Skip to content

PAT Authentication not working #198

Description

@woutervanranst

Describe the bug

Opening a new issue since I was commenting on a closed issue #15 (comment)

In WSL / PowerShell the PAT login is not working. I have tried with GITHUB_TOKEN and GH_TOKEN, it s a fine grained one as per the instructions.
This is still the case with 0.0.333 Commit: 4cbf3da

Image

Affected version

0.0.333 Commit: 4cbf3da

Steps to reproduce the behavior

  1. In a clean WSL
  2. npm install -g @github/copilot
  3. Set env var (GITHUB_TOKEN) to a fine grained one
  4. start copilot

Expected behavior

Copilot says it is logged in

Instead, it says Please use /login to sign in to use Copilot and wen I test something it says × You must be logged in to send messages. Please run /login

Additional context

No response

Activity

  1. RyanHecht commented on Oct 6, 2025

    @RyanHecht
    Collaborator

    Hi @woutervanranst -- can you check that the fine-grained token has the "Copilot Requests" permission?

  2. woutervanranst commented on Oct 6, 2025

    @woutervanranst
    Author

    @RyanHecht Yes, I even regenerated one

    Image

    with the same error

    Image

    (if that would be a wrongly scoped PAT the error msg could be more helpful)

    FWIW I m on a GitHub Enterprise with URL https://github.com/enterprises/_nameofthecompany_

  3. woutervanranst commented on Oct 6, 2025

    @woutervanranst
    Author

    This could probably be the explanation (but again would expect a clearer error msg / not being able to generate the PAT?)

    If you have access to GitHub Copilot via your organization of enterprise, you cannot use GitHub Copilot CLI if your organization owner or enterprise administrator has disabled it in the organization or enterprise settings. See Managing policies and features for GitHub Copilot in your organization for more information.

  4. woutervanranst commented on Oct 6, 2025

    @woutervanranst
    Author

    The PAT says 'never used' so it has never even been checked? (Speculation about the inner workins here)

    Image
  5. woutervanranst commented on Oct 13, 2025

    @woutervanranst
    Author

    @RyanHecht would you have any idea?

  6. woutervanranst commented on Oct 30, 2025

    @woutervanranst
    Author

    fyi it is enabled on org level. Issue still persists on Version 0.0.353 · Commit f8fd3e3

    Image

    @RyanHecht any ideas/updates?

  7. woutervanranst commented on Nov 2, 2025

    @woutervanranst
    Author

    Ok turns out this was a corporate proxy issue. The error message could be clearer though.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions