Nguyễn Thế Minh
Posted on April 15, 2023
Step 1. Generate an SSH key
cd ~/.ssh
ssh-keygen -t ed25519 -C "your_email_address"
Follow the prompts and enter your github username, e.g. github_username
Step 2. Add SSH key to SSH Agent
ssh-add ~/.ssh/id_ed25519_github_username
Step 3. Copy the SSH public-key to Github
~/.ssh/id_ed25519_github_username.pub
Step 4. Add a host entry to the ~/.ssh/config
file
Host github_username
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_github_username
Step 5. Config your remote
git remote add origin git@github.com-<your-username>[:owner-user-name]/<the-repo-name>.git
Step 6. Config git user.name and user.email
git config user.email "your email"
git config user.name "your name"
💖 💪 🙅 🚩
Nguyễn Thế Minh
Posted on April 15, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.