The video is in Arabic.
In this video, we continue setting up the work environment and explain how to upload our SSH keys to a GitHub Repository.
You will learn how to:
-
Generate a new SSH key.
-
Add the Public Key to your GitHub account.
-
Verify that the SSH connection works.
-
Start using Git without typing your password every time.
๐ฃ Steps to Create and Set Up an SSH Key on Linux and Upload It to GitHub
1. Install Git (if it isnโt installed)
sudo apt update sudo apt install git -y2. Generate a New SSH Key
Use the command:
ssh-keygen -t ed25519 -C "[email protected]"-
Replace
[email protected]with the email registered on your GitHub account. -
Press Enter when asked where to save the key (default path:
~/.ssh/id_ed25519). -
You can leave the passphrase empty, or set a password on the key for extra security.
3. Start the SSH Agent and Load the Key
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed255194. Copy the Public Key
cat ~/.ssh/id_ed25519.pubCopy all of the text that appears.
5. Add the Key to Your GitHub Account
-
Open your GitHub account.
-
Go to: Settings โ SSH and GPG keys โ New SSH key.
-
Enter a title (for example: โLinux VM Keyโ) and paste the public key you copied.
-
Save the changes.
6. Test the Connection to GitHub
ssh -T [email protected]-
The first time, it will ask: Are you sure you want to continue connecting (yes/no)?
-
Type:
yes -
If everything is fine, you will see the message:
Hi username! You've successfully authenticated, but GitHub does not provide shell access.
7. Clone the Repo Using SSH
Now, instead of the https URL, you will use the SSH URL:
git clone [email protected]:username/repo.git -