still unable to connect to github after generating password protected ssh key #169227
-
Hello. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @e55en, The main issue is that when using SSH with GitHub, you should not be entering your GitHub username or passphrase at all during git push. Instead: The SSH passphrase protects your private key locally — it’s not the same as a GitHub password or token. If Git is still prompting you for a username/password, it means your remote URL is still using HTTPS instead of SSH. Here’s how to fix it: Check your remote URL: git remote -v git remote set-url origin [email protected]:username/repo.git Now, if your key has a passphrase, you’ll only be prompted for that passphrase by your SSH agent — no GitHub username/password needed. Extra tip: You can run ssh-add ~/.ssh/your_key so you don’t have to type the passphrase every time during the session. |
Beta Was this translation helpful? Give feedback.
Hi @e55en,
The main issue is that when using SSH with GitHub, you should not be entering your GitHub username or passphrase at all during git push. Instead:
The SSH passphrase protects your private key locally — it’s not the same as a GitHub password or token.
If Git is still prompting you for a username/password, it means your remote URL is still using HTTPS instead of SSH.
Here’s how to fix it:
Check your remote URL:
git remote -v
git remote set-url origin [email protected]:username/repo.git
Now, if your key has a passphrase, you’ll only be prompted for that passphrase by your SSH agent — no GitHub username/password needed.
Extra tip: You can run ssh-add ~/.ssh/your_key so you don’t have t…