Just installed hub using chocolatey on Windows, and I get an error as soon as a I try to execute any commands
When I run the following command
HUB_VERBOSE=1 hub issue
I get the following output
$ git rev-parse -q --git-dir
$ git remote -v
$ git config --get-all hub.host
github.com username: [email protected]
github.com password for [email protected] (never stored):
> POST https://api.github.com/authorizations
> Authorization: Basic [REDACTED]
> Accept: application/vnd.github.v3+json;charset=utf-8
{"note":"hub for KyleMit@SurfaceWhoa","note_url":"https://hub.github.com/","scopes":["repo"]}
< HTTP 401
{"message":"Requires authentication","documentation_url":"https://developer.github.com/v3"}
Requires authentication
According to the docs on GitHub OAuth authentication, II should be prompted for username/password, but after I enter the username, the auth immediately fails and never prompts for a password
I tried to delete ~/.config/hub
, but it doesn't exist.
How can I prompt for / reset authentication?
$ systeminfo | grep "OS Name\|Version" OS Name: Microsoft Windows 10 Pro OS Version: 10.0.18980 N/A Build 18980
$ hub version git version 2.20.1.windows.1 hub version 2.12.6
hub checkout
asks for username and passwordSame issue here. I too installed using Choco on Windows 10. I can run git pull with no problems. "git pull-request" asks for a username and then immediately says "Error creating pull request: Unauthorized (HTTP 401)" Requires authentication. I even set these two environmental variables. Same error.
GITHUB_USER
The GitHub username of the actor of GitHub API operations.
GITHUB_PASSWORD
The GitHub password used to exchange user credentials for an OAuth token that gets stored in hub configuration. If not set, it may be interactively prompted for on first run.
Thank you for reporting!
hub version
?@jtawil777 If you've correctly set GITHUB_USER and GITHUB_PASSWORD in your environment, then hub wouldn't ask you for neither username nor password (it would instead get the values from environment variables). How did you set these variables and what are you using as your shell?
@KyleMit Does setting GITHUB_PASSWORD=<password>
in your environment work around getting prompted for password on your end?
Pushing another release that may fix the issue https://github.com/github/hub/releases/tag/v2.12.7
Sorry for the trouble!
Yep, v2.12.7 fixed the issue!! 馃帀
I updated the original comment with the hub version
as well which was on v2.12.6
Thanks so much!
Just for completeness.
faced the same issue installing hub
from conda-forge
$ hub --version
git version 2.7.4
hub version 2.12.3