wiki:git_pull_via_ssh_public_key
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
wiki:git_pull_via_ssh_public_key [2021/03/30 11:18] – created antisa | wiki:git_pull_via_ssh_public_key [2025/08/25 14:31] (current) – [References] add serverfault link antisa | ||
---|---|---|---|
Line 24: | Line 24: | ||
</ | </ | ||
+ | ==== Use different host ==== | ||
+ | You can use a custom hostname as well, e.g. | ||
+ | |||
+ | |||
+ | < | ||
+ | Host github-someorg | ||
+ | HostName github.com | ||
+ | IdentityFile ~/ | ||
+ | </ | ||
+ | <WRAP center round info 60%> | ||
+ | When using Vim vim-fugitive plugin, the GBrowse command can only work with above if it is set in ~/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | Then to clone use that host | ||
+ | |||
+ | git clone git@github-someorg: | ||
+ | | ||
+ | <WRAP center round important 60%> | ||
+ | SSH will try all of the keys it sees, so the ones provided by any running ssh-agent and the file specified above in IdentityFile. This might not be what you want, because if the ssh key from the ssh-agent is used by your different github user for different repos. | ||
+ | |||
+ | To explicitly use only the key in IdentityFile also add '' | ||
+ | </ | ||
+ | |||
+ | | ||
====== Tested on ====== | ====== Tested on ====== | ||
* | * | ||
====== See also ====== | ====== See also ====== | ||
+ | * [[wiki: | ||
====== References ====== | ====== References ====== | ||
+ | * https:// |
wiki/git_pull_via_ssh_public_key.1617103135.txt.gz · Last modified: by antisa