Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

"Could not import key" in Win7 64-bit #1037

Closed
pcdahle opened this Issue · 56 comments

9 participants

pcdahle Hylke Bons André Pinto jakobbrezigar Zagx Ibrahim Awwal jasotmp Oliver Jase Wells
pcdahle

I'm trying to setup Sparkleshare on Win7 64-bit (it went smoothly on my MacBookPro)
I'm using 0.9.5 (as 0.9.6 link does not seem to work, see other issue)

When adding the project, it doesn't work as the server doesn't accept the public key.
It seems as the public key isn't even loaded

17:55:52 | Controller | ssh-agent started, PID=1328
17:55:52 | Config | Wrote to 'C:\Users\pald\AppData\Roaming\sparkleshare\config.xml'
17:55:52 | Config | Updated option notifications:True
17:55:53 | Auth | Created keypair 'C:\Users\pald\AppData\Roaming\sparkleshare\2012-10-28 17h55.key'
17:56:03 | Auth | Could not import key 'C:\Users\pald\AppData\Roaming\sparkleshare\2012-10-28 17h55.key'

I have read other issues about this but can't seem to get a straight answer on a fix really.

pcdahle pcdahle closed this
pcdahle

Sorry, closed for a while mistakenly.

pcdahle pcdahle reopened this
Hylke Bons
Owner

what happens if you try to load the key from the command line? (ssh-add "C:\Users\pald\AppData\Roaming\sparkleshare\2012-10-28 17h55.key")

pcdahle

Hm...:

Could not open a connection to you authentication agent.

AFA I can see the ssh-agent.exe is running, and it's acutally using 20-25% CPU load (in Windows Task Manager)

André Pinto

I'm also getting this error.

Here, C:\Program Files (x86)\SparkleShare\msysgit\bin\ssh-add.exe crashes if called from the command line.

André Pinto

I fixed my problem by replacing the ssh*.exe files in C:\Program Files (x86)\SparkleShare\msysgit\bin for the same files in my Cygwin installation.

I've run 'file' in both of them and the only difference in the descriptions is that the ones inside SparkleShare's folder are "(stripped to external PDB)" while the Cygwin's executables are not.

Hylke Bons
Owner

i'm not very familiar with Windows so i'm not sure what causes this. does anyone know what "(stripped to external PDB)" means?

André Pinto

I think maybe it means they are debug builds?
Anyway, I tested the installer in a Windows XP x86 computer and it worked right away without the need to replace the ssh* files (the previous OS was Windows 7 x64), so I'm not sure about what caused this problem...

Hylke Bons
Owner

@pcdahle can you do what @andredasilvapinto did and try the cygwin ssh binaries? this way we can see whether it's the same problem.

pcdahle
Hylke Bons
Owner

still the same issue with 0.9.7?

André Pinto

I don't have SparkleShare installed anymore because I was having problems syncing many files, but I installed the 0.9.7 client to test the executables. I only get the crash when running the files from the explorer or the windows command line, if I try to run them on a cygwin bash shell they work correctly...

Hylke Bons
Owner

@andredasilvapinto but it still crashes in SparkleShare?

André Pinto

I just tried with a github repository. It doesn't work here. Here is the log:

00:41:11 | Controller | ssh-agent started, PID=Unknown
00:41:11 | Auth | Could not import key 'C:\Users\andresp\AppData\Roaming\sparkleshare\2012-11-20 00h27.key'
00:41:11 | Auth | The following keys may be used:

00:42:53 | Fetcher | C:\Users\andresp\SparkleShare.tmp\test.git | Fetching folder: ssh://git@github.com/andredasilvapinto/test.git
00:42:53 | Auth | Fetching host key for github.com

Hylke Bons
Owner

@andredasilvapinto is there a ssh-agent process running at all?

André Pinto

No, there is no ssh-agent process running. I think it tries to start the ssh-agent and fails to do so.

Hylke Bons
Owner

@andredasilvapinto yep, my guess as well. now to find out why...

André Pinto

I don't have a clue, but I guess that if I am the only one with this problem, it must be something specific to my computer. In that case you shouldn't worry at all. Maybe you should wait to see if it happens to anyone else.

jakobbrezigar

Had similar problem on windows 8. I fixed it with running SparkleShare as administrator.

Hylke Bons
Owner

i've added a bit of debug info to the latest release. does it say something different now?

André Pinto

It still gives the same error.

Here is the debug log:

15:30:27 | Controller | Could not start ssh-agent:
15:30:28 | Config | Wrote to 'C:\Users\andresp\AppData\Roaming\sparkleshare\config.xml'
15:30:28 | Config | Updated option notifications:True
15:30:40 | Auth | Created keypair 'C:\Users\andresp\AppData\Roaming\sparkleshare\2012-12-08 15h30.key'
15:30:41 | Auth | Could not import key 'C:\Users\andresp\AppData\Roaming\sparkleshare\2012-12-08 15h30.key'
15:32:43 | Config | Wrote to 'C:\Users\andresp\AppData\Roaming\sparkleshare\config.xml'
15:34:24 | Fetcher | C:\Users\andresp\SparkleShare\.tmp\test | Fetching folder: ssh://git@github.com/andredasilvapinto/test
15:34:24 | Auth | Fetching host key for github.com
15:34:24 | Cmd | ssh-keyscan -t rsa -p 22 github.com
15:34:33 | Auth | Could not fetch host key
Zagx

Hi!

I get the same error than andredasilvapinto, I can't connect to my private server with sparkleshare, but with git.cmd I can clone it.

Any idea of what is the matter?

Thanks!!

Ibrahim Awwal

How do you get these logs? I've got it running on Linux fine but on Windows trying to add github repos and it's just getting stuck. It looks to me like it might not be authenticating properly but I'm also not sure if the repository URL is even correct (looking inside ~/SparkleShare/.tmp).

Hylke Bons
Owner

@ibrahima check the about dialog.

Ibrahim Awwal

Ah thanks, turns out my issue is a bit different so I'll open a different ticket.

Edit: Never mind, user error, I didn't realize it was using its own ssh-agent and key. Everything is fine after adding the key to my github account, although it would be ideal if it could use the existing ssh-agent even on Windows. Maybe I'll look into it sometime.

Hylke Bons
Owner

does it help if you replace the space character in ther key names? e.g. "2012-12-08 15h30.key" to "2012-12-08_15h30.key"?

Hylke Bons
Owner

anyone running TortoiseGit on the same machine by any chance? there are some known issues running both together.

Zagx

Hi,
I replaced the space, and this is the log:

15:16:26 | Fetcher | C:\Users\Zag\SparkleShare.tmp\artbox | Fetching folder: ssh://abserver@192.168.1.200:22/var/cache/git/artbox
15:16:26 | Auth | Fetching host key for 192.168.1.200
15:16:26 | Cmd | ssh-keyscan -t rsa -p 22 192.168.1.200
15:16:26 | Auth | Skipping fingerprint check
15:16:26 | Cmd | .tmp | git clone --progress --no-checkout "ssh://abserver@192.168.1.200:22/var/cache/git/artbox" "C:\Users\Zag\SparkleShare.tmp\artbox"

And the window keeps on "Adding project 'artbox'", without result, I need to cancel because I don't get an error or any other message.

I have Tortoise on this machine and it works fine.

Thanks!

Hylke Bons
Owner

@Zagx could you paste the beginning of the log as well? (i should have mentioned to restart SparkleShare after renaming the keys)

Zagx

The entire Log

15:34:00 | Controller | ssh-agent started, PID=6168
15:34:00 | Config | Wrote to 'C:\Users\Zag\AppData\Roaming\sparkleshare\config.xml'
15:34:00 | Config | Updated option notifications:True
15:34:02 | Auth | Created keypair 'C:\Users\Zag\AppData\Roaming\sparkleshare\2013-01-15 15h34.key'
15:34:02 | Auth | Imported key 'C:\Users\Zag\AppData\Roaming\sparkleshare\2013-01-15 15h34.key'
15:34:07 | Config | Wrote to 'C:\Users\Zag\AppData\Roaming\sparkleshare\config.xml'
15:34:45 | Fetcher | C:\Users\Zag\SparkleShare.tmp\artbox | Fetching folder: ssh://abserver@192.168.1.200:22/var/cache/git/artbox
15:34:45 | Auth | Fetching host key for 192.168.1.200
15:34:45 | Cmd | ssh-keyscan -t rsa -p 22 192.168.1.200
15:34:45 | Auth | Skipping fingerprint check
15:34:45 | Cmd | .tmp | git clone --progress --no-checkout "ssh://abserver@192.168.1.200:22/var/cache/git/artbox" "C:\Users\Zag\SparkleShare.tmp\artbox"
15:35:20 | Fetcher | Failed to dispose properly: No process is associated with this object. at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
at System.Diagnostics.Process.Kill()
at SparkleLib.Git.SparkleFetcher.Stop()
15:35:20 | Controller | Deleted C:\Users\Zag\SparkleShare.tmp\artbox
15:35:44 | Fetcher | C:\Users\Zag\SparkleShare.tmp\artbox | Fetching folder: ssh://abserver@192.168.1.200:22/var/cache/git/artbox
15:35:44 | Auth | Fetching host key for 192.168.1.200
15:35:44 | Cmd | ssh-keyscan -t rsa -p 22 192.168.1.200
15:35:44 | Auth | Skipping fingerprint check
15:35:44 | Cmd | .tmp | git clone --progress --no-checkout "ssh://abserver@192.168.1.200:22/var/cache/git/artbox" "C:\Users\Zag\SparkleShare.tmp\artbox"
15:35:45 | Fetcher | Failed to dispose properly: No process is associated with this object. at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
at System.Diagnostics.Process.Kill()
at SparkleLib.Git.SparkleFetcher.Stop()
15:35:45 | Controller | Deleted C:\Users\Zag\SparkleShare.tmp\artbox

Hylke Bons
Owner

@Zagx i don't see that it's importing the keys with the underscores though. they still show up as spaces.

Zagx

Yes, I know, but in the folther the names are changed.

Zagx

15:54:13 | Controller | ssh-agent started, PID=9352
15:54:14 | Auth | Imported key 'C:\Users\Zag\AppData\Roaming\sparkleshare\2013-01-15_15h34.key'
15:54:14 | Auth | The following keys may be used:
2048 b8:7d:80:86:79:e9:29:46:77:25:41:09:c6:21:79:91 C:\Users\Zag\AppData\Roaming\sparkleshare\2013-01-15_15h34.key (RSA)
15:55:02 | Fetcher | C:\Users\Zag\SparkleShare.tmp\artbox | Fetching folder: ssh://abserver@192.168.1.200:22/var/cache/git/artbox
15:55:02 | Auth | Fetching host key for 192.168.1.200
15:55:02 | Cmd | ssh-keyscan -t rsa -p 22 192.168.1.200
15:55:02 | Auth | Skipping fingerprint check
15:55:02 | Cmd | .tmp | git clone --progress --no-checkout --depth=1 "ssh://abserver@192.168.1.200:22/var/cache/git/artbox" "C:\Users\Zag\SparkleShare.tmp\artbox"

Hylke Bons
Owner

@Zagx i'm not sure how that can happen. anyway your issue seems the same as #1097.

Zagx

Well, after reading this post, I can say that I have the problem before installing tortoise, I installed it because Sparkleshare does not work for me, and I would to prove if I'm doing something wrong in my server, but tortoise works fine. Mmm I have no idea what can be the problem...

Hylke Bons
Owner

@Zagx i think it has something to do with your server config. Feel free to hop by the IRC channel, it's easier to help you there.

Zagx

Solved on one of my servers, the problem was the authorized_keys file, on my other server (a dedicated server on a datacenter) I can't change the permissions of the file and I can't authorize the user...

jasotmp

Hi there, I'm in the same boat for one Win7 x64 machine...

Can someone pls zip up Cygwin files for me to test??
Ta

Log/Details Follow:

15:28:19 | Controller | ssh-agent started, PID=5108
15:28:40 | Auth | Could not import key 'C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-04 15h11.key'
15:29:01 | Auth | The following keys may be used:

CMD
C:\Program Files (x86)\SparkleShare\msysgit\bin>ssh-add '"C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-04 15h11.key"

Could not open a connection to your authentication agent.

No permissions problems, no improvement from running as Admin.

Works fine on Win8 x64 from same network, and fine from another Win7 x64 machine in another network. Tried copying /bin files from working machine with no joy. Ive tried uninstall/reinstall a few times and roaming folder/key from a working machine.

A few things different on this machine (compared to the others that are working) is this uses Agnitiums Outpost (obvioulsy tested with all disabled, but can't help wondering if something was blocked first time of install that has made it sticky) and also has OpenSSH on it.
R's,
J

André Pinto

I'm not sure your problem will be solved with the cygwin files but here are my ssh* files:
https://feupload.fe.up.pt/get/VFOMJ3CFamTWiYq

OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012

jasotmp

Thanks a bunch, but no love (see below). What components do I need to download/install from Cygwin to get this working?
Downloaded and ran http://cygwin.com/setup.exe and then tried to just grab whatever looked most relevant for ssh, but didn't end up with the desired files.

For the files you provided, it's given me an error telling me cygssp-0.dll was missing, so I grabbed MobaXterm_v6.0 and extracted (x2) and then copied file, but then it told me cygssp-0.dll is either not designed to run on Windows or it contains an error... Any additional ideas/suggestions welcome :)

André Pinto

makes sense.

cygwin's openssh package should be enough I think.

look for the ssh* files in cygwin's bin folder

jasotmp

Got Cygwin (after copying 7 or so dlls etc) but still no goodo... still getting the same import key error in logs.

I would have imagined this was a permissions issue... how is ssh-agent and all the other bits meant to run manually?

Current response in privileged CMD is:
C:\Program Files (x86)\SparkleShare\msysgit\bin>ssh-agent
mkdtemp: private socket dir: No such file or directory

André Pinto

open up a cygwin bash shell and type:

eval `ssh-agent`
ssh-add path_to_your_key_file

anyway, your problem looks different from mine. if you check the logs you see that I was getting:

15:30:27 | Controller | Could not start ssh-agent:

and you are not. so my solution won't probably work for you.

jasotmp

OK is this what I should expect? Sorry but I'm a total tardo on linux :P I understand that my key is now 'compromised', but of course I'll be generating a new one when I get er working.

Thanks a BUNCH btw :) You've been awesome

C:\cygwin>cygwin
Copying skeleton files.
These files are for the users to personalise their cygwin experience.

They will never be overwritten nor automatically updated.

./.bashrc' ->/home/JA//.bashrc'
./.bash_profile' ->/home/JA//.bash_profile'
./.inputrc' ->/home/JA//.inputrc'
./.profile' ->/home/JA//.profile'

JA@Desky ~
$ ssh-agent 'C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key'
cygwin warning:
MS-DOS style path detected: C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key
Preferred POSIX equivalent is: /cygdrive/c/Users/JA/AppData/Roaming/sparkleshare/2013-02-06 10h30.key
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 1: -----BEGIN: command not found
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 2: MIIEpAIBAAKCAQEAwb8+p1QgnZ/Phctt3DGcNvkYW82Gcs+4o
GCz1GJAaciLVHbG: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 3: y9u2iHagBHQU8Bj5GOSk48JrQ07PBxsDCoayNzZS6XUkwlhdp
vzBmEhTxTEfJGWp: command not found
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 4: Xpryw8mV2+z8fhTprAg1S+4n0ZrWMZTcg9CkZ6f0k1NkR73pX
KGUsCS2iCkWAeWk: command not found
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 5: QhynVa3UZ4X9xigB2Bfo0w/zDTfD/WGs+bPOi+JFyiyTYxZZL
2GxWpTzDtAFmQV9: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 6: hIqGkX/4248C4n7QrUN0IFsrXvAcKXICFCaNeQ26lAPPe59qh
jMZLPynw1IBXv3X: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 7: 0/KASeHgyzHNn6Tz2d8odiJZcz+FljsZ3XNISQIDAQABAoIBA
QDBErEAFMDv8xrd: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 8: rOzM2o9e5PqWOYj7Du9gux1Zz5N7F0Npp3fSHSCYewZZich3v
5s0aF29LriveXCs: command not found
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 9: Fwn/ylz80mDrjzZTibXCO+08sQ7x2lK7dafDxEuaOl/hqxevG
W4HZqKeCTWbFl7P: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 10: SBY8MYY0WdZLnnW3XJSaH9dJdTyFEBiOLJEHyU0lJgrCDeSQ
9P/JOw622O61aDog: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 11: XFvcwJtTk0ogBxPpTMs6sLpu1iEUN661kCnFDXIEVIL0vZrg
w2iWmbPsmOtkGs2H: command not found
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 12: a09fqToTOhLHaQDTY7OlAQmhc5sqw54PcmHTFez/+3hffPfn
5N//zCDUesdOm3//: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 13: lX9ixxv1AoGBAOMLiTh6d76CLvsUxr+wmEhLSgInPVJd12Dv
3E4ZCDSncWOJJvpc: command not found
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 14: ahOsbWDpLt2J/BouneRqfGbueXk5VGTPupLn8pPzKz4mbiQJ
9Aahkid7/3jSIJmH: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 15: 8Le8J6aIAlY5CBvutP7Z0d5ST3i89/yOC9nkBLAB2VwJN3CY
M8sXRsYDAoGBANp0: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 16: nD8rvFSpqpIvkmazumin2Ai2GhiAR7CetqFVfLc9SAtXIwEp
opFgvgUtF/RTDAQ7: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 17: KdYA140tYactCiR4kjoSBprLXVeAudABsrlsEATefAAQJtOs
JLxr4USbqtNvGQBC: command not found
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 18: AF1vHJ1RirbhKYQ4l+YAG29urWirwIz1Uhcdi3zDAoGAb3rz
lpKzhww+6zPJXsfk: command not found
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 19: DeNB5IrF1lKTdVpw7rvlxozM5RWr2NRVlXFdh28XftnIukZX
apdKm/POG1Kl+JXy: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 20: wz02Y6TLf8m43OMyOatNqyt8RiPOs/QGowC061Tu6M06CRUN
M/FZ1fLOaLdIgG5y: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 21: rTsDfjR6OHGiEhv5mmfEbWcCgYAtlGsNWyi+WXA3dCmNuC5K
q8qNdsFXH1zV4yej: command not found
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 22: 3dxZtzWS+Clbkr5Squa62b/HwJQfReDiv+Y5lKBtax5UobuQ
1jX+kjP1j+w1FEWg: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 23: HoXxHiKtOLGBNMetcKzdzcUEvIdw4FSHKinEQUE6CxzIc65t
1NPkmikgT8WrI3xv: command not found
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 24: SkDSVQKBgQDT+HMBiaNxJrwO2YbJMV8NM8udNZOUYMan38m4
YL4e10tZ/7cJoT2P: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 25: VU2kgNoNIOM5Ia0KBBKwdrkSIXUuMXuN0FvyzKmLm1Zz8F8Q
4cVlvRYl56q9HDz7: command not found
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 26: NqViDhDSBShJGsdLIfN7FnfP/00rgSHGgmkBxts7Ygvm3Wo3
V25B1Q==: No such file or directory
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key: line 27: -----END: command not found

JA@Desky ~
$ ssh-add 'C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-04 14h54.key'
Could not open a connection to your authentication agent.

André Pinto

not really.

you should run:

eval `ssh-agent`

instead of:

ssh-agent 'C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key'

This launches the background ssh-agent. Only the ssh-add needs the path to the key.

jasotmp

Well I uninstalled my firewall/security just to cover bases, but no go. Ran CMD prompt as both admin & normal user, and still cannot connect to auth agent... Is there a log for the ssh-agent? Can I telnet into a port for it? The process does stay running.

Tx

C:\cygwin>Cygwin.bat

JA@Desky ~
$ eval "ssh-agent"
SSH_AUTH_SOCK=/tmp/ssh-U6z8qSgjWnAL/agent.1248; export SSH_AUTH_SOCK;
SSH_AGENT_PID=3416; export SSH_AGENT_PID;
echo Agent pid 3416;

JA@Desky ~
$ ssh-add 'C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key'
Could not open a connection to your authentication agent.

André Pinto

you are still not using the right command.
it's not:

eval "ssh-agent"

it's:

eval `ssh-agent`
jasotmp

By golly by gosh that makes a difference!!! Still no Sparkleshare - will try uninstall/reinstall, then dropping in cygwin files again and see what gives.

C:\cygwin>Cygwin.bat

JA@Desky1 ~
$ eval ssh-agent
Agent pid 4488

JA@Desky1 ~
$ ssh-add 'C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key'
cygwin warning:
MS-DOS style path detected: C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key
Preferred POSIX equivalent is: /cygdrive/c/Users/JA/AppData/Roaming/sparkleshare/2013-02-06 10h30.key
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Identity added: C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key (C:\Users\JA\AppData\Roaming\sparkleshare\
2013-02-06 10h30.key)

JA@Desky1 ~
$

jasotmp

W00t. Thanks a lot for your help Andre - Can I get you some bitcoins or a Paypal donation?

Dodgy Details:
Uninstall, reboot & re-install and now all ok. I hadn't done this since removing the firewall/HIPS software. So thats my best guess for the cause (I did uninstall/reinstall after fully disabling the firewall so a bit unlucky on that front as never had the issue previously).

Or perhaps just the installation of Cygwin made it happier on this latest reinstall. Happy she's working the end :P

André Pinto

There's no need for that. It was just a small tip and probably not the one that fixed your problem. Thanks though. Good to know that it's working now.

note: if you happen to use the cygwin shell again you should try to use the cygwin paths as the warning stated:
/cygdrive/c/Users/JA/AppData/Roaming/sparkleshare/2013-02-06 10h30.key
instead of the Windows path
C:\Users\JA\AppData\Roaming\sparkleshare\2013-02-06 10h30.key

jasotmp
Hylke Bons
Owner

so what was the issue?

Oliver

Hello together,

to add something to the discussion... I had the problem that on Win7 64-bit the process to add a new hosted project just hang in the first step. The .tmp-folder did not "grow" or something, so I suggested a problem before actually getting on the server. Trying to connect via ssh resulted in being asked for my password, so I believed there had not been a key transfer yet.

When adding the project via the SparkleShare GUI I hoped that I would perhaps be asked for a user password, but in the forums and wiki here I found hints how this worked on Unix-based systems. So I tried the following with the original installation of SparkleShare.

  • Open a terminal on your windows client and navigate to C:\Program Files (x86)\SparkleShare\msysgit\bin

    cd "C:\Program Files (x86)\SparkleShare\msysgit\bin"

  • Generate a new keypair with name id_rsa and now password

    ssh-keygen -t rsa
    answer the question for the name of the keypair with "id_rsa" and set no password for the key
    The key and public key will be saved in "C:\Program Files (x86)\SparkleShare\msysgit\bin"

  • Copy the public key via SCP to your server and save it here:

    "~/.ssh/id_rsa.pub"

    I used WinSCP for this, because the shell command in msysgit\bin did not work, perhaps just wrong syntax

  • Log in via SSH on your Server and copy the public key to the authorized_keys:

    cat id_rsa.pub >> ~/.ssh/authorized_keys

    Logout and do the following on your windows client

  • Navigate to "C:\Program Files (x86)\SparkleShare\msysgit.ssh" and copy your private key there

    cd C:\Program Files (x86)\SparkleShare\msysgit.ssh
    copy ..\bin\id_rsa .

After that I could login to the server without using my password, so I suggested this would be enough.

But because SparkleShare generated a keypair named by a timestamp in the folder "%appdata%\sparkleshare" on my windows client I suggested it uses this pair for authenticating and this did not work. So I moved the files to a backup folder, copied my id_rsa.pub and id_rsa to this destination and restarted SparkleShare.

This worked!
Perhaps someone can try this, too.

I hope my post helped some of you.

Regards,

Oliver

André Pinto

@hbons I don't know. maybe jasotmp's firewall...

Jase Wells

I have a user where the original problem is happening — when he tries to checkout the project, the SparkleShare progress bar just stays at the beginning mark and nothing happens. In the log, I see this: (user name and remote server have been obscured)

13:18:12 | Controller | ssh-agent started, PID=5772
13:18:12 | Config | Wrote to 'C:\Users\Joe User\AppData\Roaming\sparkleshare\config.xml'
13:18:12 | Config | Updated option notifications:True
13:18:17 | Auth | Created keypair 'C:\Users\Joe User\AppData\Roaming\sparkleshare\2013-05-15 13h18.key'
13:18:27 | Config | Wrote to 'C:\Users\Joe User\AppData\Roaming\sparkleshare\config.xml'
13:18:28 | Auth | Could not import key 'C:\Users\Joe User\AppData\Roaming\sparkleshare\2013-05-15 13h18.key'
13:20:14 | Fetcher | C:\Users\Joe User\SparkleShare.tmp\MCF01 | Fetching folder: ssh://storage@---.com/MCF01
13:20:14 | Auth | Fetching host key for ---.com
13:20:14 | Cmd | ssh-keyscan -t rsa -p 22 ---.com
13:20:16 | Auth | Skipping fingerprint check
13:20:16 | Cmd | .tmp | git clone --progress --no-checkout --depth=1 "ssh://storage@---.com/MCF01" "C:\Users\Joe User\SparkleShare.tmp\MCF01"
13:20:20 | Fetcher | Failed to dispose properly: No process is associated with this object. at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
at System.Diagnostics.Process.Kill()
at SparkleLib.Git.SparkleFetcher.Stop()
13:20:21 | Controller | Deleted C:\Users\Joe User\SparkleShare.tmp\MCF01

So it looks like the key pair gets created (and indeed they are in the sparkleshare folder with the log file) but the key file does not get loaded into ssh-agent. I will try to run ssh-agent and ssh-add manually on his machine to see if there is any output from ssh-add.

Note: This is with the 1.0.0 release. (Maybe the log file should include the version?) This particular user is NOT on our Active Directory domain. But I've tried it on fresh installs of Win7 and it works for me, whether it's a machine on the domain or not.

Hylke Bons
Owner

anyone who can try 1.2 and see if this still happens?

Hylke Bons
Owner

let me know if this still happens with a fresh 1.2 install, as some things have changed in the way keys are handled. i'm closing this meanwhile.

Hylke Bons hbons closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.