Skip to content

Latest commit

 

History

History
64 lines (49 loc) · 1.3 KB

File metadata and controls

64 lines (49 loc) · 1.3 KB

Git and GitHub

Tool Version
Git 2.55.0
GitHub CLI (gh) 2.97.0
sudo dnf install git gh

Global Git config

~/.gitconfig:

[user]
    name = raioviajante
    email = 195070286+RaioViajante@users.noreply.github.com
[init]
    defaultBranch = main
[pull]
    rebase = false
[fetch]
    prune = true

The @users.noreply.github.com address keeps the real email out of commit metadata.

GitHub authentication over SSH

  • Auth method: SSH (not HTTPS tokens).

  • Dedicated key: ~/.ssh/id_ed25519_github (+ .pub), used only for GitHub.

  • ~/.ssh/config:

    Host github.com
        HostName github.com
        User git
        IdentityFile ~/.ssh/id_ed25519_github
        IdentitiesOnly yes

Setup:

ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_github -C "raioviajante github"
gh auth login --git-protocol ssh --hostname github.com   # upload the key
ssh -T git@github.com                                     # expect a success banner
gh auth status

Private keys never leave the machine and are not committed (.gitignore blocks id_ed25519*).

This repository

git remote -v
# origin  git@github.com:RaioViajante/workstation-setup.git (fetch/push)

Default branch main, non-rebasing pulls, automatic prune on fetch.