I am trying to use CopSSH to access Git repositories from a Windows server.
Running the following command from that server, where CopSSH is installed, works just fine:
C:\!>git clone me@server-name:test.git
Cloning into 'test'...
me@server-name's password:
warning: You appear to have cloned an empty repository.
Running the same command from another machine gives me this:
C:\!>git clone me@server-name:test.git
Cloning into 'test'...
1 [main] sshd 3204 C:\Programs\ICW\bin\sshd.exe: *** fatal error - could not load u, Win32 error 1114
Stack trace:
Frame Function Args
00289934 6102749B (00289934, 00000000, 00000000, 00000000)
00289C24 6102749B (61177B80, 00008000, 00000000, 61179977)
0028AC54 61004AFB (61179084, 61161E94, 61161E94, 00000000)
0028AE84 6100135E (610309EB, 6123E904, 0028AEF0, 77A4DD84)
0028BB88 6115764C (00000003, FFFFFFFF, FFFFFFFF, 61117D12)
0028BBC8 610CB0E3 (00000003, 10454DB8, 0028BCCC, 1045BC48)
0028BBE8 6102951B (10454DB8, 0028BCCC, 1045BC48, 0028BCF4)
0028C108 610C01A5 (10459778, 10459828, 00000002, 00000000)
0028C158 004132A8 (10459778, 10459828, 10459778, 00428C02)
0028C188 00413634 (10459778, 10459828, 10458670, 1044BC14)
0028C248 0041397C (10458680, 10458670, 10458670, 00000001)
0028C288 0040ABC3 (00000062, 0000000A, 10456008, 0040BBD5)
0028C2C8 00439A56 (00000001, 00000000, 10456008, 0040C7CA)
0028C308 0040BD3A (1045C050, 10454D28, 0028C348, 00418836)
0028C348 0041422E (1045C050, 00000003, 00000000, 0028CC04)
0028CD18 004040F3 (00000000, 0028CE64, 0028CD58, 61006CD3)
End of stack trace (more stack frames may be present)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Any ideas what could help here?
PS Just to prevent common suggestions that can be easily found on Google - the user is in Administrators group on the server. Port 22 is open, and ssh access works fine itself from any remote machine. On the client machine I am using Windows + Git + Putty + RSA key. The issue is that "git clone me@server-name:test.git" works if run it on the server (even though it uses the ssh under the hood as well), but does not work using a network connection being run from the remote machine.
The problem is probably related to the way PKA is implemented in OpenSSH Cygwin: It uses credentials of the service account instead of the real user. Check Local Computer Policy --> User Rights Assignment to find out if the service account is limited to logins (Deny .....). You need also to make sure that the service account has proper permissions on target directories.
No restrictions in the Windows Group Policy snap-in or anywhere else.
Remote access from another machine to the server:
1. ssh + password => works
C:\!>ssh me@server-name
me@server-name's password:
Last login: Wed Aug 7 12:39:15 2013 from ...
me@server-name ~
$
2. ssh + private key => works
(I can navigate through directories on the server remotely and do whatever I want there, no permission issues)
C:\!>ssh me@server-name -i me.key
Last login: Wed Aug 7 12:41:38 2013 from ...
me@server-name ~
$
3. git through ssh using a private key => does not work
C:\!>git clone me@server-name:test.git
Cloning into 'test'...
1 [main] sshd 10160 C:\Programs\ICW\bin\sshd.exe: *** fatal error - could not load u, Win32 error 1114
Stack trace:
Frame Function Args
00289934 6102749B (00289934, 00000000, 00000000, 00000000)
00289C24 6102749B (61177B80, 00008000, 00000000, 61179977)
0028AC54 61004AFB (61179084, 61161E94, 61161E94, 00000000)
0028AE84 6100135E (610309EB, 6123E904, 0028AEF0, 77A4DD84)
0028BB88 6115764C (00000003, FFFFFFFF, FFFFFFFF, 61117D12)
0028BBC8 610CB0E3 (00000003, 10454DB8, 0028BCCC, 1045BC48)
0028BBE8 6102951B (10454DB8, 0028BCCC, 1045BC48, 0028BCF4)
0028C108 610C01A5 (10459778, 10459828, 00000002, 00000000)
0028C158 004132A8 (10459778, 10459828, 10459778, 00428C02)
0028C188 00413634 (10459778, 10459828, 10458670, 1044BC14)
0028C248 0041397C (10458680, 10458670, 10458670, 00000001)
0028C288 0040ABC3 (00000062, 0000000A, 10456008, 0040BBD5)
0028C2C8 00439A56 (00000001, 00000000, 10456008, 0040C7CA)
0028C308 0040BD3A (1045C050, 10454D28, 0028C348, 00418836)
0028C348 0041422E (1045C050, 00000003, 00000000, 0028CC04)
0028CD18 004040F3 (00000000, 0028CE64, 0028CD58, 61006CD3)
End of stack trace (more stack frames may be present)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
If I am executing this "git clone me@server-name:test.git" on the server locally, it works fine.
Any other ideas?
Try to make your password available by using passwd -R command as described at http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3