Re: [PATCH v2] ssh: add 'ssh.keyfile' option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Sixt <j6t@xxxxxxxx> writes:

> Am 23.04.20 um 13:21 schrieb Raymond E. Pasco:
>> When a specific private key needs to be used with a repository, manually
>> specifying it via 'core.sshCommand' is not ideal. This option allows a
>> keyfile to be specified in the local configuration. If a keyfile is
>> specified, SSH agents are disabled for the command.
>
> You can do this without modifying Git. Say, your key file is
> ~/.ssh/id_other_ed25519, then do this:
>
> Rename your remote to use an invented host name:
>
>   git remote set-url origin git@xxxxxxxxxxxxxxxx:other/repo
>
> Then attach the invented name to the real host name and the identity in
> your ~/.ssh/config:
>
>   Host other.github.com
>     Hostname github.com
>     Identity ~/.ssh/id_other_ed25519

Nice.  I wonder if this answer (and answers to other "how would I
use .ssh/config to adjust Git to suite my use?" questions people may
often ask) can be put in some of our documentation.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux