copSSH and Git

40 views
Skip to first unread message

Sparky12

unread,
Sep 30, 2009, 1:21:34 PM9/30/09
to msysGit
Hi Guys,

So I have this strange problem using x64 Window 7 Ultimate. Basically,
I have setup copSSH via the

c:\SSH\Home\User\.ssh

directory and I have managed to login successful using both Putty.exe
and Command line plink via

> plink -P port_number user@ip_address -i /path/to/private_key

The problem I am facing is that everytime I attempt to clone git using

> git clone user@ip_address:port_number/SSH/home/User/myapp.git

I just keep hitting a brick wall with

> "fatal: The remote end hung up unexpectedly"

I have tried using both ssh.exe and using plink.exe (with and without
pageant) and still just keep getting this error.

Any ideas ?

Johannes Sixt

unread,
Sep 30, 2009, 1:49:51 PM9/30/09
to msy...@googlegroups.com, Sparky12
On Mittwoch, 30. September 2009, Sparky12 wrote:
> I have setup copSSH via the
>
> c:\SSH\Home\User\.ssh
>
> directory and I have managed to login successful using both Putty.exe
> and Command line plink via
>
> > plink -P port_number user@ip_address -i /path/to/private_key
>
> The problem I am facing is that everytime I attempt to clone git using
>
> > git clone user@ip_address:port_number/SSH/home/User/myapp.git
>
> I just keep hitting a brick wall with
>
> > "fatal: The remote end hung up unexpectedly"

If you must specify a port, then you cannot use ssh syntax. Try:

git clone ssh://user@ip_address:port_number/SSH/home/User/myapp.git

-- Hannes

Sparky12

unread,
Sep 30, 2009, 1:58:14 PM9/30/09
to msysGit
Hi thanks for the response

Indeed I have actually done this but it appears that it still returns

> "fatal: The remote end hung up unexpectedly"

I have noticed that when I try and connect via git - it looks for the
keys in c:\users\name\.ssh and NOT in c:\SSH\Home\User\.ssh

So I attempted to copy the keys directly from c:\SSH\Home\User\.ssh to
c:\users\name\.ssh - then run git clone command again - still the same
problem.

> "fatal: The remote end hung up unexpectedly"

It's strange that a copSSH Bash windows can connect - but a git Bash
window generates this error.

I have literally tried everything and it just keeps hitting me with
this error - anyway to trace or determine what is going ?

Thx

Marius Storm-Olsen

unread,
Oct 1, 2009, 2:12:51 AM10/1/09
to Sparky12, msysGit
Sparky12 said the following on 30.09.2009 19:58:

> Hi thanks for the response
>
> Indeed I have actually done this but it appears that it still returns
>
>> "fatal: The remote end hung up unexpectedly"
>
> I have noticed that when I try and connect via git - it looks for the
> keys in c:\users\name\.ssh and NOT in c:\SSH\Home\User\.ssh

AFAIK the path c:\users\name is the *real* Windows path to the users
which have full accounts on the machine, so I guess copSSH checks if
the person logging in has a Windows account, and looks for the .ssh
there. My guess is that uses without a full Windows user account would
still be looking into the c:\SSH\Home\User directory.. But this is
just speculation, I've never used copSSH.

> So I attempted to copy the keys directly from c:\SSH\Home\User\.ssh to
> c:\users\name\.ssh - then run git clone command again - still the same
> problem.
>
>> "fatal: The remote end hung up unexpectedly"
>
> It's strange that a copSSH Bash windows can connect - but a git Bash
> window generates this error.
>
> I have literally tried everything and it just keeps hitting me with
> this error - anyway to trace or determine what is going ?


I think you might be hitting the Cygwin vs MSys incompatibility.
copSSH is based on Cygwin, and it's generally known that mixing Cygwin
apps and MSys apps are not a good idea.
See, the copSSH daemon/service, which is a cygwin app, would have to
run the MSys bash, provided with msysgit, in order for git to work.
So, if the system incompatibility triggers a crash in the msys bash, I
guess you'd get the response above. You might want to go full Cygwin
on your Windows server instead, and you can still use msysGit for your
clients..

Again, this is all speculation, or hints if you will..

--
.marius

Marius Storm-Olsen

unread,
Oct 1, 2009, 7:16:14 AM10/1/09
to Sparky12, msysGit
Sparky12 said the following on 30.09.2009 19:21:

> So I have this strange problem using x64 Window 7 Ultimate. Basically,
> I have setup copSSH via the
>
...
> Any ideas ?

Also, if you're dead determined to run Windows, you might consider
installing andLinux (or coLinux if you're brave/like to tinker), which
allows you to run Linux apps unmodified on your Windows box. You can
even start the system as a service when Windows boots, so it's ready
for use right away, or just boot the system when you want to develop.

Look at the following page to open up the Linux ports from your
Windows IP:
http://www.andlinux.org/wiki/index.php5?title=Howto:_open_externally_accessible_ports_for_SSH_server,_webserver,_etc.

If installed in COFS mode, you can even run a bog standard Linux Git
on your Windows drive, while you're developing on Windows. I haven't
tested this though, so don't blame me if it's unstable/not working.

Will give you access to all git tools though, in their 'natural'
environment.

--
.marius

Marius Storm-Olsen

unread,
Oct 1, 2009, 7:22:09 AM10/1/09
to Sparky12, msysGit
Marius Storm-Olsen said the following on 01.10.2009 13:16:

> Sparky12 said the following on 30.09.2009 19:21:
>> So I have this strange problem using x64 Window 7 Ultimate. Basically,
>> I have setup copSSH via the
>>
> ...
>> Any ideas ?
>
> Also, if you're dead determined to run Windows, you might consider
> installing andLinux (or coLinux if you're brave/like to tinker), which
> allows you to run Linux apps unmodified on your Windows box. You can
> even start the system as a service when Windows boots, so it's ready
> for use right away, or just boot the system when you want to develop.

Ah sorry, never mind, doesn't support 64-bits Windows yet:
http://colinux.wikia.com/wiki/Dashboard_for_developing_a_64_bit_coLinux

--
.marius

Sparky12

unread,
Oct 1, 2009, 9:34:23 AM10/1/09
to msysGit
Hi Guys,

Thanks so much for the help - I've successfully managed to get this
working now on a Windows 7 x64 box with copSSH - I also thought I
would document the experience and post it to help others in the
future. It's a longy - but hopefully helpful to the community.

http://www.timdavis.com.au/git/setting-up-a-msysgit-server-with-copssh-on-windows/

Thanks again,

Tim
Reply all
Reply to author
Forward
0 new messages