└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # 🖥 How to Connect Your GitHub Account to a Fresh Windows Install 2 | image 3 | 4 | ## 1️⃣ Download and Install Git 5 | - Download latest version: [git-scm.com/download/win](https://git-scm.com/download/win) 6 | 7 | 1 8 | 9 | 10 | - Run the installer and click **Next** until you see **"Use Vim" as default editor**. 11 | 12 | 2 13 | 14 | > ❌ No! Unless you enjoy pain. 15 | ✅ Choose Notepad or any editor you have installed, you can always change later. 16 | 17 | - Continue clicking **Next, Next, Next** until it starts installing. 18 | 19 | image 20 | 21 | --- 22 | 23 | ## 2️⃣ Finish Installation 24 | - When complete, check **"Launch Git Bash"** and click **Finish**. 25 | 26 | 3 - installation complete 27 | 28 | --- 29 | 30 | ## 3️⃣Git Bash opens: 31 | image 32 | 33 | --- 34 | 35 | ## 4️⃣ Set Your Git Identity 36 | In Git Bash, set your username and email to match your GitHub account: 37 | 38 | ```git config --global user.name "YourGitHubUsername"``` 39 | ```git config --global user.email "your@email.com"``` 40 | 41 | ℹ️ Use the same email that’s set as your primary email in GitHub. 42 | 43 | 5 - config GitHub 44 | 45 | --- 46 | 47 | 48 | ## 5️⃣ Generate a New SSH Key 49 | 50 | *In Git Bash, run: 51 | ```ssh-keygen -t ed25519 -C "your@email.com"``` 52 | 53 | image 54 | 55 | --- 56 | 57 | ## 6️⃣ Press Enter to accept the default save location. 58 | 59 | **Optionally set a passphrase** (can be empty – just press Enter) 60 | 61 | 62 | --- 63 | 64 | ## 7️⃣ Git will generate a keyfingerprint and an image 65 | 66 | 67 | --- 68 | 69 | ## 8️⃣ Add Your SSH Key to the SSH Agent 🗝 70 | This tells Windows/Git to remember your SSH key in memory so you don’t have to type the passphrase every time you push or pull: 71 | 72 | 73 | 6 - ssh key (watch out for spaces) 74 | 75 | 76 | ⚠️**WATCH OUT FOR SPACES** when you type in the command 77 | 78 | 79 | image 80 | 81 | 82 | --- 83 | 84 | ## 9️⃣ Add Your SSH Key to GitHub 85 | **Copy the SSH key** (in Git Bash, type this): 86 | 87 | ```bash 88 | cat ~/.ssh/id_ed25519.pub 89 | ``` 90 | 91 | This command will print your **public SSH key** in Git Bash. 92 | 93 | **Then:** 94 | 1. Go to **GitHub → Settings → SSH and GPG keys** 95 | 2. Click **New SSH key** 96 | 7 - new SSH key 97 | 98 | 3. Give it a title (e.g., `"My Windows PC"`) 99 | 4. Paste the key from Git Bash 100 | 5. Click **Add SSH key** 101 | 102 | 103 | --- 104 | 105 | ## 🔟 Test the Connection 106 | 107 | image 108 | 109 | In bash, type 110 | ```bash 111 | "ssh -T git@github.com" 112 | ``` 113 | 114 | **The message will be :** 115 | **"The authenticity of host 'github.com (140.82.121.3)' can't be established.** 116 | **This key is not known by any other names.** 117 | **Are you sure you want to continue connecting (yes/no/[fingerprint])?"** 118 | 119 | ## Here’s what it means in plain English: 120 | 121 | "Permanently added 'github.com'..." → Your computer now trusts GitHub’s fingerprint, so it won’t ask you again. 122 | "Hi MihaelaChicu! You've successfully authenticated..." → GitHub has confirmed your SSH key matches your account. You’re officially connected. ✅ 123 | 124 | 9 - Test the connection and succeed 125 | 126 | "...but GitHub does not provide shell access." → Normal message. GitHub doesn’t give you a remote terminal, only Git repo access. 127 | 128 | 129 | 130 | **Don't panic** 131 | 132 | image 133 | 134 | This is the first time you’re connecting to GitHub from this computer. Should I trust this server’s fingerprint?” 135 | It’s a security handshake to make sure you’re actually talking to GitHub and not some fake server. 136 | 137 | **Type - yes** 138 | 139 | then you will see "You've successfully authenticated" message 140 | 141 | 8 - victory 142 | 143 | 144 | 145 | --- 146 | 147 | 148 | 149 | --------------------------------------------------------------------------------