Wenn man nicht nur einen privaten SSH-Key hat, dann kann man via -i diesen angeben: > -i identity_file > > Selects a file from which the identity (private key) for RSA or DSA authentication is read. The default is \~/.ssh/identity for protocol version 1, and \~/.ssh/id_rsa and \~/.ssh/id_dsa for protocol version 2. Identity files may also be specified on a per-host basis in the configuration file. It is possible to have multiple -i options (and multiple identities specified in configuration files). Nun finde ich diese Option nicht beim git Befehl. Um dieses doch zu können verwendet man einen Eintrag in der \~/.ssh/config ``` {.html name="code"} Host gh Hostname github.com User git IdentityFile ~/.ssh/privateKey ``` Somit kann man für einen speziellen Host den Benutzer und die Identity festlegen. Oct 14 2011 © https://www.bananas-playground.net 2000 - 2025