4 ms·
https://hub.github.com/hub.1.html#github-oauth-authentication https://hub.github.com/hub.1.html#github-oauth-authenticatio... > Hub will prompt for GitHub user
by tylerhou 5y ago
https://hub.github.com/hub.1.html#github-oauth-authentication https://hub.github.com/hub.1.html#github-oauth-authenticatio...
> Hub will prompt for GitHub username & password the first time it needs to access the API and exchange it for an OAuth token, which it saves in ~/.config/hub.
And if you don't want to use Hub for all your Git operations, you can extract the token from the file after using Hub once, or call the OAuth endpoint directly by reusing Hub's code: https://github.com/github/hub/blob/c8e68d548a39ec0fab6f674a669c21b54d4eec61/github/client.go#L1001 https://github.com/github/hub/blob/c8e68d548a39ec0fab6f674a6...