Re: GIT over ssh with identity file

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

 



oliverw <oliver@xxxxxxxxxxxxx> writes:

> Forgive me if this has been answered before. I've searched everywhere but
> couldn't find a solution.
>
> Is it somehow possible to pass your private key file to git when working
> over ssh. What I have in mind would be something like this:
>
> git -i /path/to/private/key clone ssh://homer@xxxxxxxxxxx/var/git/repos.git 

I think the standard way people use for things like this is something
along the lines of...

    $ cat >>$HOME/.ssh/config <<\EOF
    Host homer-at-foo
      Hostname foo.bar.com
      User homer
      IdentityFile ~/.ssh/homer-at-foo.pub
    EOF
    $ git clone homer-at-foo:/var/git/repos.git
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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