As of August 13, 2021, Github.com no longer allows use of a password for authentication.
Instead, you can create a personal access token to authenticate via the command line.
In order to do so, visit https://github.com/settings/tokens and follow the instructions below.
- Click on the generate new token button and select "Generate new token".
2. Enter a note or name for your token (it's useful to use the note to declare which computer the token will be used on. In this case, if your CISL-issued laptop has the hostname, cisl-<city name>, enter it here. Then select an expiration date for your token and grant the token access "Full control of private repositories" if appropriate. If not, grant the token a different set of privileges.
3. Scroll down to the bottom of the page and click, the "Generate Token" button.
4. Once your token has been generated, click the copy button to copy the token string to your clipboard.
5. When trying to clone, push or pull from a private repository, via the command line, paste your copied personal access using the following syntax:
git clone https://<PERSONAL ACCESS TOKEN>@github.com/<GITHUB ACCOUNT>/<REPOSITORY>
Your resulting command should look something like:
git clone https://ghp_aWwY1ssbR3adCrumbSdtYlMxNCOqQs40MxJ0@github.com/johnsonbk/my_private_repository