Git

Highlights

chevron-rightSetup after Reboothashtag

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.git
chevron-rightFrequent used commandshashtag
  • 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 main

Setup (debian)

circle-info

Git is pre-installed on WSL Ubuntu

Support for password authentication was removed on August 13, 2021.

Configure

  • Set account default identity

Developer flow

Start a new Github repo

Git Credential Manager

Source: - Git Credential Managerarrow-up-right - Creating a personal access tokenarrow-up-right

  • Install

  • Setup

circle-info

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:

Connecting to GitHub with SSH

Source: https://docs.github.com/en/authentication/connecting-to-github-with-ssharrow-up-right

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

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/arrow-up-right

Tool for testing Semantic Versioning: https://github.com/npm/node-semverarrow-up-right

Gist

Search my own gist: on the "Your gists" page, enter the following to the search box:

How-to

chevron-rightCompare Files with Git Diff Toolhashtag
chevron-rightDownload a file from Github repohashtag
chevron-rightSplit a folder and create new repohashtag
chevron-rightSetup after reboothashtag
  • 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

Last updated