-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The gh binary does not appear to respect the GITHUB_TOKEN environment variable, where that token stores a "personal access token"
Steps to reproduce the behavior
Type
/ # GITHUB_TOKEN=MY_TOKEN_WAS_HERE gh auth status
github.com
✓ Logged in to github.com as kljensen (GITHUB_TOKEN)
✓ Git operations for github.com configured to use https protocol.
✓ Token: *******************
This shows me that I am good-to-go, I believe. But, then, when I try to clone a repo, I get the following prompt for a username:
/ # GITHUB_TOKEN=MY_TOKEN_WAS_HERE gh repo clone 'kljensen/dotfiles'
Cloning into 'dotfiles'...
Username for 'https://github.com':
The repo "kljensen/dotfiles" is private.
Expected vs actual behavior
I expected to be able to clone the repo because I had a valid GITHUB_TOKEN environment variable. Instead, I was prompted to authenticate.
MahmoudH96
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working