git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
From: Sam Millman <sam.millman@gmail.com>
To: "Randall S. Becker" <rsbecker@nexbridge.com>
Cc: git@vger.kernel.org
Subject: Re: How to use multiple SSH keys on Git exe (not bash)
Date: Wed, 10 Jan 2018 16:01:19 +0000
Message-ID: <CALKyTE4eqbw_kMEH9fpwFa-s-WagFn5j9OxK68YXoARm7f4zHQ@mail.gmail.com> (raw)
In-Reply-To: <000c01d38a2b$d14c4620$73e4d260$@nexbridge.com>

That would mean I would need to change the case for a letter everytime
I have a repo with a new key, that would mean I would be restricted to
12 client repos at a time :\, seems very hacky to me

On 10 January 2018 at 15:58, Randall S. Becker <rsbecker@nexbridge.com> wrote:
> On January 10, 2018 10:31 AM Sam Millman wrote:
>> I am trying, for the sake of PhpStorm, to get multiple SSH keys working using
>> git . exe, which means no GitBash.
>>
>> I can get the keys to work just fine with GitBash.
>>
>> I edited my .ssh/config to look like (I know this is incorrect):
>>
>> Host bitucket . org
>> IdentityFile ~/.ssh/id_rsa1
>>
>> Host bitbucket . org
>> IdentityFile ~/.ssh/id_rsa
>>
>>
>> And id_rsa1 works, I can actually pick from the other repo. But, of course,
>> id_rsa does not now.
>>
>> I change to:
>>
>> Host bitucket . org-dd
>> HostName bitbucket . org
>> IdentityFile ~/.ssh/id_rsa1
>>
>> Host bitbucket . org-sas
>> HostName bitbucket . org
>> IdentityFile ~/.ssh/id_rsa
>>
>> And now only id_rsa works.
>>
>> I also tried combining the two IdentityFile lines together like so (for some
>> reason):
>>
>> Host bitucket . org
>> IdentityFile ~/.ssh/id_rsa1
>> IdentityFile ~/.ssh/id_rsa
>>
>> I have even tried running ssh-agent . exe, adding id_rsa1 to that and then
>> running the git clone with no result.
>>
>> The weird thing is, I have two public keys as well and they both load in the
>> ssh . exe (they return errors about format), I just cannot get my ssh . exe to
>> work with multiple private keys.
>>
>> On 10 January 2018 at 15:29, Sam Millman <sam.millman@gmail.com> wrote:
>> > I am trying, for the sake of PhpStorm, to get multiple SSH keys
>> > working using git . exe, which means no GitBash.
>> >
>> > I can get the keys to work just fine with GitBash.
>> >
>> > I edited my .ssh/config to look like (I know this is incorrect):
>> >
>> > Host bitucket . org
>> > IdentityFile ~/.ssh/id_rsa1
>> >
>> > Host bitbucket . org
>> > IdentityFile ~/.ssh/id_rsa
>> >
>> >
>> > And id_rsa1 works, I can actually pick from the other repo. But, of
>> > course, id_rsa does not now.
>> >
>> > I change to:
>> >
>> > Host bitucket . org-dd
>> > HostName bitbucket . org
>> > IdentityFile ~/.ssh/id_rsa1
>> >
>> > Host bitbucket . org-sas
>> > HostName bitbucket . org
>> > IdentityFile ~/.ssh/id_rsa
>> >
>> > And now only id_rsa works.
>> >
>> > I also tried combining the two IdentityFile lines together like so
>> > (for some
>> > reason):
>> >
>> > Host bitucket . org
>> > IdentityFile ~/.ssh/id_rsa1
>> > IdentityFile ~/.ssh/id_rsa
>> >
>> > I have even tried running ssh-agent . exe, adding id_rsa1 to that and
>> > then running the git clone with no result.
>> >
>> > The weird thing is, I have two public keys as well and they both load
>> > in the ssh . exe (they return errors about format), I just cannot get
>> > my ssh . exe to work with multiple private keys.
>> >
>> > Has anyone got any ideas on how to solve this?
>
> The ~/.ssh/config file is case sensitive by definition when it comes to Host and HostName. Try bitbucket.org for one and Bitbucket.org for another. You will have to change the remote URL accordingly to pick up the correct identity.
>
> Good luck,
> Randall
>
>

  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CALKyTE7+qJSYHQRB44HjHXK_EjOxNnCfQOROSDVVwAFR-gMnXQ@mail.gmail.com>
2018-01-10 15:30 ` Sam Millman
2018-01-10 15:58   ` Randall S. Becker
2018-01-10 16:01     ` Sam Millman [this message]
2018-01-10 16:14       ` Randall S. Becker
2018-01-10 15:58   ` Ævar Arnfjörð Bjarmason
2018-01-10 16:02     ` Sam Millman
2018-01-10 16:23       ` Randall S. Becker
2018-01-10 16:26         ` Sam Millman
2018-01-10 16:29           ` Randall S. Becker
2018-01-10 16:32             ` Sam Millman

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALKyTE4eqbw_kMEH9fpwFa-s-WagFn5j9OxK68YXoARm7f4zHQ@mail.gmail.com \
    --to=sam.millman@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=rsbecker@nexbridge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox