Setup GitHub SSH Access on a Machine
Setup GitHub SSH Access on a Machine
Pre-requisite: Ensure Git is installed on the machine.
Generate SSH Key:
Run the following command, replacing the email with your GitHub account email:
ssh-keygen -t ed25519 -C "your_email@example.com"
Copy SSH Public Key:
Display the public key by running:
cat ~/.ssh/id_ed25519.pub
Copy the entire output.
Add SSH Key to GitHub Account:
Log in to your GitHub account.
Navigate to Settings → SSH and GPG keys.
Click New SSH key, give it a recognizable title, and paste the copied public key.
Save the key.
Clone GitHub Repository Using SSH:
Use the SSH URL format to clone your repository:
git clone git@github.com:username/repository.git