On Thu, 12 Sep 2013 05:47:07 -0700 (PDT)
berd <bersc...@googlemail.com> wrote:

> >Do you have to keep the test key or you just want to *replace* it
> >with the 
> production key?
> 
> I want replace the test key to production key.

Okay.  Next time please write your intent clearly -- that would have
saved me from typing 60% of my first answer :-)

> > If replacement is needed, then just overwrite the  id_rsa and
> > id_rsa.pub 
> files in your %HOME%\.ssh folder with the new 
> 
> > ones (they might also be named id_dsa[.pub], and the .pub file (the 
> public part of the key)
> 
> You mean, I can the new key only copt in folder g:/.ssh/

As it turns out based on the new information from you, not quite.
I'll explain why in a moment.

> A point to note is still, the name of my nek key ist
> "mykey_130903.pub" and "mykey-privatekey_130903.ppk" is this
> important?

That's good you mentioned this (again, note that the more information
you tell the better for everyone).

The extension ".ppk" suggests this is the key generated by PuTTY's key
generation tool (puttygen.exe) *in its own container format,* not
compatible with the OpenSSH client distributed as part of Git for
Windows.  A corollary to this is that there's no sense in putting those
keys into %HOME%/.ssh -- the OpenSSH client can't make use of them
anyway.

That "mykey_130903.pub" had most probably been extracted from the .ppk
key (using that same puttygen.exe tool) and given to you so you could
make your private key trusted on the remote system (that thing is
beyond the scope of our present discussion though).

Can you verify your .ppk key is generated by PuTTY?  Open it in a text
editor and look at the first line -- does it read something like

PuTTY-User-Key-File-2: ssh-rsa

or

-----BEGIN RSA PRIVATE KEY-----

Which one?  The first means it's a PuTTY-compatible form, the second
means it's an OpenSSH-compatible form.

If the key would turn out to be of the *second* form, just copy it
under %HOME%\.ssh and name it "id_rsa" -- possibly replacing whatever
key is already there under that name.

Now remove all the Host-entry hacks you might have in your
%HOME%\.ssh\config file.

If, instead, the key turn out to be PuTTY's, you have two options:

* Get PuTTY and convert your .ppk key file into an OpenSSH-compatible
  format using puttygen.exe.

  You run puttygen, click the Load button in its interface, enter the
  key's passphrase to decrypt the key then engage the "Conversions ->
  Export OpenSSH key" main menu entry; when asked for a file to save,
  navigate to your %HOME%\.ssh folder and choose "id_rsa" as the name
  of the file.

* Work with PuTTY as I described in my previous mail and just use this
  .ppk key file.

  To do this, you first set up Git to use PuTTY's plink.exe as its SSH
  client (via setting the GIT_SSH environment variable), then start
  pageant.exe (the key agent), activate the context menu on its tray
  icon, choose the "Add key" entry then select your .ppk key in the
  dialog, and enter the key's passphrase when asked.

> Sorry, I forgot to write that I'm using TortoiseGIT.

TortoiseGit relies on calling stock Git binary and so respects the
GIT_SSH setup already explained.  You can also just use plain Git along
with this front-end.

> ssh -T -vvv user@host git --version

> sh.exe": c:xampphtdocsworkspace_aptanarepositorisbmykey_130911.ppk:
> command not found 

Something awry with the formatting.  And I have no idea why the key
file is mentioned -- as I've say, if .ppk is not just a brain-dead
extension and key is PuTTY's, stock SSH client won't work with it.

> Here is first error, my key, that I use ist mykey_130903.ppk not 
> mykey_130911.ppk

That's not the problem, I reckon.

> eval $(ssh-agent -s)
> 
> Agent pid 9528
> 
> ssh-add mykey_130903.ppk

That's strange!  It *might* turn out that just the person who handed
you this key is idiot, and the key is in OpenSSH format indeed.

Anyway, I gave you enought information to deal with either case.

> after this I make pull "git pull" and get following message:
> fatal: Not a git repository (or any of the parent directories): .git

As you should have guessed by yourself, this error has nothing to do
with keys and SSH: it simply tells you you're currently not in a
directly which Git is able to identify as the work tree of a Git
repository.  Change the directory to a real repository and retry.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to