docs: update home/linux/Setting-Up-Git

This commit is contained in:
Cheeks 2024-07-04 22:23:59 +00:00 committed by cheeks
parent 0f3b1e397f
commit 3d463bf3a8

View File

@ -2,7 +2,7 @@
title: Setting Up Git
description: Steps to get up and running with Git
published: true
date: 2024-07-04T22:20:23.659Z
date: 2024-07-04T22:23:57.563Z
tags:
editor: markdown
dateCreated: 2024-06-30T20:44:58.238Z
@ -52,10 +52,10 @@ Host github.com or git server
Taken from [this superuser thread](https://superuser.com/questions/232373/how-to-tell-git-which-private-key-to-use):
> Regarding contacting the same host with different keys: Here it is essential to understand that in `.ssh/config`
> `Host` is a *custom name* you can give to the host specified under `HostName`.
> The github.com part in the git URL git@github.com:torvalds/linux.git refers to this Host and thus has to match it exactly.
>If you have a second Github ssh key, you can create a section Host github2 in .ssh/config and then use the URL git@github2:torvalds/linux.g(see also superuser.com/a/1519694/96128).
> Regarding contacting the same host with different keys:
> Here it is essential to understand that in `.ssh/config`, `Host`is a *custom name* you can give to the host specified under`HostName`.
> The `github.com` part in the git URL `git@github.com:torvalds/linux.git` refers to this`Host`and thus has to match it exactly.
>If you have a *second* Github ssh key, you can create a section `Host github2` in `~/.ssh/config` and then use the URL`git@github2:torvalds/linux.g`(see also superuser.com/a/1519694/96128).
user905686
Commented Apr 12, 2021 at 17:42