From: Johannes Sixt Date: Thu, 23 Apr 2020 17:24:09 GMT Subject: Re: [PATCH v2] ssh: add 'ssh.keyfile' option Message-ID: In-Reply-To: <20200423112110.45405-1-ray@ameretat.dev> 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@other.github.com: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