[msysGit] Re: git newbie

2008-01-26 Thread Steffen Prohaska



On Jan 26, 2008, at 5:24 PM, Johannes Schindelin wrote:



Hi,

On Sat, 26 Jan 2008, Karthik wrote:

Then make sure that you uploaded the public key correctly, and  
that you

connect with the correct username.  Do this by connecting via ssh
directly to repo.or.cz (if it succeeds, it will complain that it  
is not

a shell, but you will know that it works).

I have given the public key when registering. I generated the keys
with puttygen. I am not sure if the comment part Generated in the
keys should be included. I tried connecting to repo.or.cz with
putty. In the ssh Auth part I asked it to use the corresponding
private key and when I supplied my username in the SSH console it
said - public key refused by the server


So you did not give ssh.exe any chance to pick up the private key.

I have no idea how easy it is (or if it is possible at all) to reuse
Putty's private keys with MSys' ssh.



Very easy:

 - Set the environment variable GIT_SSH to point to plink.exe,
   for example c:\Programme\PuTTY\plink.exe

 - Include your login name in git urls.  Otherwise plink.exe will
   report strange errors.

 - Use PuTTYgen to import an existing key (menu Conversions >
   Import) and save it in PuTTY format (menu File > Save private
   key). It is recommended that you set a pass phrase on your
   key.  If you do not have a key yet you can use PuTTYgen to
   create a new one.

 - Add Pageant to your Autostart menu and modify the Pageant
   entry in the Autostart menu to automatically load your private
   key on startup.  To do so, add the path to your private key to
   the target of the menu entry (right click on the Autostart
   menu entry). For example :
C:\Programme\PuTTY\pageant.exe \
"c:\Dokumente und Einstellungen\username\.ssh\id_putty.ppk"

 - Upon your next login Pageant should automatically start, ask
   for your pass phrase, and display itself as a small icon in
   the bottom right of the menu bar displaying a computer with a
   hat.  You can right click the icon to manage your keys.

Steffen



[msysGit] Re: git newbie

2008-01-26 Thread Johannes Schindelin

Hi,

On Sat, 26 Jan 2008, Karthik wrote:

> Then make sure that you uploaded the public key correctly, and that you 
> connect with the correct username.  Do this by connecting via ssh 
> directly to repo.or.cz (if it succeeds, it will complain that it is not 
> a shell, but you will know that it works).
> 
>   I have given the public key when registering. I generated the keys
>   with puttygen. I am not sure if the comment part Generated in the 
>   keys should be included. I tried connecting to repo.or.cz with 
>   putty. In the ssh Auth part I asked it to use the corresponding 
>   private key and when I supplied my username in the SSH console it 
>   said - public key refused by the server

So you did not give ssh.exe any chance to pick up the private key.

I have no idea how easy it is (or if it is possible at all) to reuse 
Putty's private keys with MSys' ssh.  This is how _I_ would have done it: 
use the ssh-keygen tool we deliver with msysGit, for this (and only for 
this) purpose...

Hth,
Dscho

P.S.: you're the second Russian guy (I'm assuming, of course) I get an 
email from with a very funny quoting style; I would have expected to read 
my email with "> " prepended, but instead _your_ answers are indented.  
What mail client is that?



[msysGit] Re: git newbie

2008-01-26 Thread Karthik

First, make sure that you set up the remote repository correctly. 

I have indeed setup the repository currectly. My repository can be
found at - http://repo.or.cz/w/pyttt.git

Then make sure that you uploaded the public key correctly, and that you 
connect with the correct username.  Do this by connecting via ssh directly 
to repo.or.cz (if it succeeds, it will complain that it is not a shell, 
but you will know that it works).

I have given the public key when registering. I generated the keys
with puttygen. I am not sure if the comment part 
Generated in the keys should be included. I tried connecting to
repo.or.cz with putty. In the ssh Auth part I asked 
it to use the corresponding private key and when I supplied my
username in the SSH console it said - public key refused by the server

Then make sure that you have the correct remote url when pushing; git:// 
is _not_ correct, and neither is http://.  You should use ssh://.

Also, try "git ls-remote" with that url first.  If that complains, you 
probably forgot the /srv/git, or have an extra colon in your url.

I copied the entire push url in git-bash and did a git ls-remote on
that. The most irritating part comes here when it 
Says @repo.or.cz's password where username is my Windows
login username. Why would it do that ? Also, when I tried
Contacting git guys in IRC they asked me to paste the ssh keys in
.ssh folder in ~. But I am not in a linux box where I have 
my home directory.

If it still fails, it might be helpful to give us enough information to 
work with (i.e. exact command lines, exact outputs, exact error 
messages...)

Ciao,
Dscho



[msysGit] Re: git newbie

2008-01-26 Thread Johannes Schindelin

Hi,

On Fri, 25 Jan 2008, Karthik K wrote:

> I am trying to create a simple git repository with a single file and 
> trying to push it to repo.or.cz. I created ssh-public and private keys 
> as told in IRC channel but I am not able to push my contents to the 
> remote url.

First, make sure that you set up the remote repository correctly. 

Then make sure that you uploaded the public key correctly, and that you 
connect with the correct username.  Do this by connecting via ssh directly 
to repo.or.cz (if it succeeds, it will complain that it is not a shell, 
but you will know that it works).

Then make sure that you have the correct remote url when pushing; git:// 
is _not_ correct, and neither is http://.  You should use ssh://.

Also, try "git ls-remote" with that url first.  If that complains, you 
probably forgot the /srv/git, or have an extra colon in your url.

If it still fails, it might be helpful to give us enough information to 
work with (i.e. exact command lines, exact outputs, exact error 
messages...)

Ciao,
Dscho