Summary - GitHub account
- Git course
- Beginner
- Lesson 64/80
- 5 min
Combine account and SSH steps to set up a secure connection.
GitHub Accounts and Secure Connections
By creating a GitHub account, you can manage your repositories online and collaborate with other developers. An SSH key helps your computer authenticate securely with GitHub without entering your account password each time.
GitHub Account
|
v
Add Public SSH Key
|
v
Secure AuthenticationYou should keep your private key on your computer and add only your public key to your GitHub account.
Practice Complete Secure Connection Preparation
Define the GitHub account username and SSH public key filename in a JavaScript object. The username must be coder_ali and the public key filename must be id_ed25519.pub. Print both values on separate lines.
Starter code
const connection = {
// Hesap ve SSH bilgilerini ekle
};
// Bilgileri yazdırSample solution
const connection = {
username: "coder_ali",
publicKey: "id_ed25519.pub"
};
console.log(connection.username);
console.log(connection.publicKey);Expected output
coder_ali id_ed25519.pub
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 Which action is required to establish a secure SSH connection?
- Creating a new username for every commit
- Adding the public key to the GitHub account Correct answer
- Deleting the GitHub account
- Sharing the private key publicly
Explanation: The public key is added to the GitHub account. The private key remains secret on the computer and is used for authentication.
2 Complete the SSH Authentication Flow
ssh-keygen -t ed25519
# Oluşturulan dosyalar:
# id_ed25519 ve id_ed25519.pub
# GitHub hesabına eklenecek dosya: ____
ssh-keygen -t ed25519
# Oluşturulan dosyalar:
# id_ed25519 ve id_ed25519.pub
# GitHub hesabına eklenecek dosya: id_ed25519.pub
Explanation: The public key is id_ed25519.pub. Its contents are added to GitHub, while the private key id_ed25519 stays on the computer.
3 Account and SSH Steps
| Term | Meaning |
|---|---|
GitHub hesabı |
User account on the platform |
Username |
Name identifying the account |
ssh-keygen |
Generates SSH keys |
Public key |
Public key added to the server |