From 3a64150247c6ffdc491d54c16c37a56ab0661619 Mon Sep 17 00:00:00 2001 From: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Fri, 13 Dec 2024 17:31:03 +0100 Subject: [PATCH] Update index.md --- content/blog/painless-git-ssh-setup/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/blog/painless-git-ssh-setup/index.md b/content/blog/painless-git-ssh-setup/index.md index 2988d5d..f2b3a60 100644 --- a/content/blog/painless-git-ssh-setup/index.md +++ b/content/blog/painless-git-ssh-setup/index.md @@ -99,7 +99,7 @@ You can read more about the available configuration options of `ssh-keygen` at t Host github.com Hostname github.com User git - IdentityFile %d/.ssh/keys/github + IdentityFile ~/.ssh/keys/github AddKeysToAgent yes RequestTTY no SessionType none @@ -119,7 +119,7 @@ ssh github.com SSH will use the settings provided: - `Hostname`: The address to connect to. - `User`: The user to authenticate as, usually "git". -- `IdentityFile`: Path to the private key, `%d` is the user home directory. +- `IdentityFile`: Path to the private key. - `AddKeysToAgent`: Adds the key to the ssh-agent, usful if the SSH key is password protected. - `RequestTTY`: Set to `no` as no shell is needed. - `SessionType`: Set to `none` since no commands are executed on the Git hosting provider. @@ -166,7 +166,7 @@ Run: ssh github.com ``` -If you don't get any errors, the setup is successful. 🥳 +If you don't get any errors, the setup is successful. :partying_face: ### Configure Git to Use SSH Instead of HTTPS {{< tabs items="Bitbucket,Codeberg,Github,Gitlab" >}} @@ -235,13 +235,13 @@ All existing repositories will point to the new provider, and new repositories w # Edit old "Host" block to automatically push code to new git hosting provider Host github.com Hostname codeberg.org - IdentityFile %d/.ssh/keys/codeberg + IdentityFile ~/.ssh/keys/codeberg # Rest of parameters # New "Host" block to support new repositories Host codeberg.org Hostname codeberg.org - IdentityFile %d/.ssh/keys/codeberg + IdentityFile ~/.ssh/keys/codeberg # Rest of parameters ``` {{< /details >}}