Git
Highlights
Setup after Reboot
SSH Key authentication is needed because username/password authentication is no longer supported. Make sure the ssh key already created; see Create SSH Key;
$ eval "$(ssh-agent -s)"
$ ssh-add -l
$ ssh-add ~/.ssh/id_rsa_gabepublic
Enter passphrase for /home/gabe/.ssh/id_rsa_gabepublic:
Identity added: /home/gabe/.ssh/id_rsa_gabepublic (gabe.public@outlook.com)
$ ssh -T git@github.com
$ git clone git@github.com:gabepublic/llm-chainlit.gitFrequent used commands
Clone, Pull, Checkin & Push
git clone git@github.com:gabepublic/aws-ec2-docker.git
cd aws-ec2-wocker
git pull
# checkin
git add *
git commit -am "commit message"
git push -u origin mainSetup (debian)
Git is pre-installed on WSL Ubuntu
Support for password authentication was removed on August 13, 2021.
Installing on Linux - see https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Configure
Set account default identity
Developer flow
Start a new Github repo
Git Credential Manager
Source: - Git Credential Manager - Creating a personal access token
Install
Setup
Error: fatal: Response status code does not indicate success: 401 (Unauthorized).
The error occurs while doing git push or git clone of private repo.
Possible reason: the "personal access token" is configured with expiration or no-expiration. The error may result from expired token.
Create SSH Key
RELATED: SETUP > Dev Environments > SSH |
On the Linux host, create the ssh key (public & private)
Add to ssh-agent
References:
How to generate keys: http://help.github.com/msysgit-key-setup/
Why keys should be password protected and how to set up ssh-agent: http://help.github.com/working-with-key-passphrases/
Connecting to GitHub with SSH
Source: https://docs.github.com/en/authentication/connecting-to-github-with-ssh
Useful topics:
About SSH
Generating a new SSH key and adding it to the ssh-agent
Adding a new SSH key to your GitHub account
Testing your SSH connection
Topic - for better repo search
Add topic(s) to the repo to enable better search of repositories.
Go to the repository. On the righthand side, About, click the Settings
Add Topics
To search based on topic(s), for example, enter the following to the Github page - "Search or jump to...":
Semantic Versioning
Source: http://semver.org/
Tool for testing Semantic Versioning: https://github.com/npm/node-semver
Gist
Search my own gist: on the "Your gists" page, enter the following to the search box:
How-to
Setup after reboot
Check agent; likely no ssh key registered with the agent; https://docs.github.com/en/authentication/troubleshooting-ssh/error-permission-denied-publickey
re-add the ssh key
Test connection
Now, should be able to clone private repo
Note: may need to do after each Windows reboot
References
[REF-1] Official Git Documentation; include reference, book, video, and other external links
[REF-2] Learn Git with Bitbucket Cloud; Excellent Tutorials
[REF-3] git - the simple guide;
Last updated