Using github via command line with two factor authentication.
Step 1: Make a token. Instructions are here under "Creating a token"
https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line
Step 2: You will get a long, hexadecimal, number. Store it somewhere. This is your token, and password. If you are storing it on a shared machine, like Theia, then make sure you:
chmod 400 /path/to/token.txt
Step 3: When using github:
git ... whatever command ...
Enter your github username: ... give it your github username ...
Password ...enter the token from Step 2.
If you are not using two-factor authentication and you are tired of typing your username/password: - from within a local github directory, type
git config --global credential.helper store
Next time you checkout code, enter username and password and they will be stored automatically - see