This guide explains how to install git
, configure your Git identity, and set up GitHub authentication on Arch Linux using the username and email hypergolang
.
There are two methods to authenticate with GitHub: SSH Keys (traditional) and GitHub CLI (modern, easier for VS Code integration).
sudo pacman -Syu git openssh
Set your Git username and email:
git config --global user.name "hypergolang"
git config --global user.email "[email protected]"
Check configuration:
git config --list
Create a new ed25519 SSH key:
ssh-keygen -t ed25519 -C "hypergolang"
When prompted:
- Enter file location: Press Enter for default (
~/.ssh/id_ed25519
) - Enter passphrase: Press Enter for no password, or set one for security
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
Copy the entire output starting with ssh-ed25519
.
- Go to GitHub SSH Keys Settings
- Click "New SSH Key"
- Paste the copied key
- Add title (e.g.,
ArchLinux-PC
) - Save
ssh -T [email protected]
Expected output:
Hi hypergolang! You've successfully authenticated, but GitHub does not provide shell access.
Create SSH config:
vim ~/.ssh/config
Add:
Host github.com
AddKeysToAgent yes
IdentityFile ~/.ssh/id_ed25519
sudo pacman -S github-cli
sudo pacman -S git
git config --global user.name "hypergolang"
git config --global user.email "[email protected]"
gh auth login
Choose these options:
- Where do you use GitHub? →
GitHub.com
- Preferred protocol? →
HTTPS
- Authenticate Git with GitHub credentials? →
Yes
- How to authenticate? →
Login with a web browser
Follow the browser authentication process.
gh auth status
You should see:
✓ Logged in to github.com as hypergolang
git config --global credential.helper ""
git config --global credential.helper manager
- You prefer traditional Git workflow
- You work primarily in terminal
- You want to avoid browser authentication
- You use VS Code with GitHub extensions
- You want seamless integration with GitHub features (PRs, Issues)
- You prefer HTTPS over SSH
- You want to avoid VS Code authentication popups
git clone [email protected]:username/your-repo.git
git clone https://github.com/username/your-repo.git
If using GitHub CLI method, VS Code will automatically use your authenticated GitHub CLI session without additional popups.
If using SSH method, you may need to configure VS Code's Git settings to use SSH.
- Make sure SSH agent is running:
ssh-add -l
- Test connection:
ssh -T [email protected]
- Check auth status:
gh auth status
- Re-login if needed:
gh auth login
- For SSH: Use
[email protected]:username/repo.git
format - For HTTPS: Use
https://github.com/username/repo.git
format
You now have Git configured with GitHub authentication using your preferred method. Both methods will work seamlessly with your development workflow.