T
T
Timur Yakhin2014-10-24 08:07:55
git
Timur Yakhin, 2014-10-24 08:07:55

Is it possible to specify the key to the server when cloning a git repository via ssh?

Is it possible when cloning a git repository via ssh to specify the key to the server, as it is on ssh:
ssh [email protected] -i ./key_file
I tried:
git clone [email protected]:repo.git -i ./key_file
but it didn’t work. Read man on git - not a word about keys.
PS I know about ssh-add, but this is not what you need, you need one line without calling ssh-add

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Gregory, 2014-10-24
@difiso

Perhaps this will answer your question Multiple SSH Keys settings for different github account + first comment.

B
brutal_lobster, 2014-10-24
@brutal_lobster

stackoverflow.com/questions/7927750/specify-an-ssh...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question