hbons / SparkleShare

Share and collaborate by syncing with any Git repository instantly. Linux, macOS, and Windows.
https://sparkleshare.org
Other
4.88k stars 576 forks source link

Sparkleshare ignores `.ssh/config` in 2.0.1 ? #1801

Closed codeon-nat closed 6 years ago

codeon-nat commented 6 years ago

I am not 100% what the problem is, but a setup that worked nicely in 1.4 is now broken under 2.

What happened:

Oops! Something went wrong....

What I expected to happen:

Something went right.

This happens when:

Sync Remote Project -> Own Server

I use a gitolite server with an own identify file and a different port.

16:41:53 Cmd |  | ssh-keyscan -t rsa -p 666 git.xxx.de
16:41:53 Auth | Skipping fingerprint check
16:41:54 Auth | Accepted host key for git.xxx.de
16:41:54 Cmd | tmp | git ls-remote --heads "ssh://git@git.xxx.de:666/foo"
16:41:54 Fetcher | Failed

But manually:

git ls-remote --heads "ssh://git@git.xxx.de:666/foo"
a2454419e84f870ab9a11b3d5b1fcd1b1f275417    refs/heads/master

I would conclude, that the .ssh/config file, where I declare the IdentifyFileis ignored:

Host git.xxx.de
        HostName git.xxx.de
        IdentityFile ~/.ssh/id_rsa_gitolite_c
        User git
        Port 666
hbons commented 6 years ago

Version 2 uses its own SSH configuration. This was done because using the system's configuration caused a lot of problems . You'll need to use the SSH key provided in the status icon menu.

codeon-nat commented 6 years ago

At first I didn't make the mental connection with "computer key" and "user identity". But I can see why this is this way. I think the idea with the "computer key" kinda falls flat, if you are using a lot of computer and servers like me. But so be it.

hbons commented 6 years ago

Yea, this needs some better documentation and hints in the UI. The idea was to make this more understandable to users who just run the clients, with an admin running a server who you'd give the Computer ID to (and so already recognise the "ssh-rsa AAAA..." bit). In the future I'll add more info about this in the setup dialogs.

ktorn commented 4 years ago

@hbons can sparkleshare's new ssh process use an ssh-config of its own?

I'm asking this because I need to access a git repo on remote-host that's only remotely accessible via a jump-host hence I normally use some ssh-config trickery like:

Host remote-host
        ServerAliveInterval 30
        ProxyCommand ssh -q jump-host /bin/nc -w 90 <internal-ip> 22

This worked well with old versions of sparkleshare that shared my main ssh-config.

Edit: Just noticed that someone created an issue just for this: #1902