HACKER Q&A
📣 forgotmypw17

Can GitHub be accessed through console-only for entire workflow?


I'm asking this in light of the notices I've received that GitHub will be disabling password-based authentication.

Is it possible to generate a token for authentication from a console browser?

Previously, entire workflow was possible from command-line, but now a graphical browser is required...

Anyone figured out a way around this?

Asking for accessibility reasons.

[1] https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/


  👤 tylerhou Accepted Answer ✓
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/c8e68d548a39ec0fab6f674a6...


👤 pwg
In the paragraph that starts: "Beginning August 13, 2021" there is a link "such as a personal access token".

Clicking it goes to a page about how to authenticate. One of the options is:

Connecting over SSH

If you clone with SSH, you must generate SSH keys on each computer you use to push or pull from GitHub.

So just generate some ssh keys and setup ssh auth and you should be able to continue using the command line to push/pull from github.


👤 max_hammer
I am using SSH key authentication.

I use `maggit` + `forge` in Emacs for all operations


👤 I_complete_me
I think this does what you need: https://cli.github.com/

👤 hprotagonist
magit-forge is real close.