From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: GIT over ssh with identity file Date: Wed, 04 Feb 2009 00:41:10 -0800 Message-ID: <7vbpti1tnd.fsf@gitster.siamese.dyndns.org> References: <21826348.post@talk.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org To: oliverw X-From: git-owner@vger.kernel.org Wed Feb 04 09:42:54 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1LUdLH-0001Dm-25 for gcvg-git-2@gmane.org; Wed, 04 Feb 2009 09:42:43 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752095AbZBDIlR (ORCPT ); Wed, 4 Feb 2009 03:41:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752066AbZBDIlQ (ORCPT ); Wed, 4 Feb 2009 03:41:16 -0500 Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:59198 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751655AbZBDIlQ (ORCPT ); Wed, 4 Feb 2009 03:41:16 -0500 Received: from localhost.localdomain (unknown [127.0.0.1]) by b-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id 5F45F2A68B; Wed, 4 Feb 2009 03:41:15 -0500 (EST) Received: from pobox.com (unknown [68.225.240.211]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by b-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id A71012A682; Wed, 4 Feb 2009 03:41:12 -0500 (EST) In-Reply-To: <21826348.post@talk.nabble.com> (oliver@weichhold.com's message of "Wed, 4 Feb 2009 00:37:18 -0800 (PST)") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Pobox-Relay-ID: 9588D7A0-F297-11DD-BEA4-6F7C8D1D4FD0-77302942!a-sasl-quonix.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: oliverw 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@foo.bar.com/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