shell-plugins icon indicating copy to clipboard operation
shell-plugins copied to clipboard

Cannot use GitHub Copilot CLI extension in `gh` with 1Password

Open blimmer opened this issue 2 years ago • 6 comments

Platform or tool

GitHub

Desired or expected behavior

Copilot CLI is now a public beta and exposed through the gh CLI. However, it doesn't work when I'm using the op shell integration.

I followed the instructions to add the extension and enable it here: https://docs.github.com/en/copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli#installing-copilot-in-the-cli

Current behavior

I get an error that I'm not authed everytime I try to run a copilot command. If I unalias the 1password integration (unalias gh), and go through the normal logic process it works.

Relevant log output

> gh auth status
github.com
  ✓ Logged in to github.com account blimmer (GITHUB_TOKEN)
  - Active account: true
  - Git operations protocol: ssh
  - Token: ghp_************************************
  - Token scopes: 'copilot', 'gist', 'notifications', 'project', 'read:org', 'repo', 'user'
> gh copilot suggest hello

✗ Error: No valid OAuth token detected

To get started with GitHub Copilot in the CLI, please run: gh auth login --web -h github.com to authenticate via web browser.


If I go through the `gh auth login --web -h github.com` process, it succeeds, but I keep getting the "No valid OAuth token detected" error.

op CLI version

2.13.1

blimmer avatar Dec 14 '23 23:12 blimmer

This appears to still be an issue with gh copilot cli in the public release as well now.

op CLI version: 2.26.1 gh version: 2.46.0

DandyLyons avatar Mar 22 '24 14:03 DandyLyons

I am still experiencing this issue.

kensternberg-authentik avatar Jul 11 '24 00:07 kensternberg-authentik

Yea same. op: 2.30 gh: 2.57.0

RandolfTjandra avatar Sep 19 '24 17:09 RandolfTjandra

I am experiencing the same issue

byoung-ditto avatar Oct 14 '24 16:10 byoung-ditto

Just tried to use gh copilot and having the same issue. Guessing there has to be some additional work in this plugin to support this gh extension.

Hopeful we can get some traction back on this one 🙏.

Hacksore avatar Feb 08 '25 14:02 Hacksore