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

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

 



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

-- Hannes



[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