How to setup SparkleShare beta2 for mac with your own server

Today the first SparkleShare beta for mac came out. SparkleShare is somehow very similar to dropbox but instead of being bound to one company, SparkleShare is based on git and therefor allows hosting your repositories on your own servers. I’ve been waiting for this release for because one of my colleagues is already using it on linux for quite a while.

Unfortunately the documentation is a little thin about self hosted repositories so here are the necessary steps to get it working:

  1. Download and install SparkleShare for Mac
  2. Create a bare git repository on your server and make sure you can connect to it using public key authentication
  3. Start up SparkleShare and add a new folder. In the address field add the address of your server to which you can log in to via public key authentication. In the folder field add the absolute path to the repository on the server.

Initially I tried to set it up via the built in setup assistant but for some reason an error occurred. I was able to log in and clone via the command line though. It turned out that I misinterpreted the address field because I was thinking that the usual ssh://user@server url would go in there.

You can also add a remote folder via the command line although that doesn’t seem to be recommended as mentioned in the comments.

  1. Open up a Terminal and cd to ~/SparkleShare
  2. Then clone your remote repository into that folder: git clone user@server/path/to/repo.git
  3. The folder should now appear in the SparkleShare menu and work as expected

Also make sure to have a working /usr/bin/git executable or symlink an existing git binary to that location otherwise SparkleShare will crash right away.

20 Responses to How to setup SparkleShare beta2 for mac with your own server

  1. Thanks for writing this up.

    Using the setup form has some benefits over manually cloning: It installs a whole list of exclude rules to ignore cache and temporary files the OS and apps create. Also your name/email will be added to the folder, so it doesn’t fall back to the global git configuration (which may be different).

    • The setup form didn’t work for me though. An error always occurred without telling what went wrong. I was able to login and clone but it just didn’t work from within SparkleShare. Doing it the manual way worked right away.

  2. Hot Tip:
    If youre SparkleShare doesnt want to start delete its files in ~/.config and the whole SparkleShare Folder in ~ . Make Shure to backup any files not yet synced. Also unzip the app again and delete old copies. Doing all that opened the splash screen again for me.

    Tim

  3. Hi

    I had to add:

    [receive]
    denycurrentbranch = ignore

    to .git/config in the server’s git repository (after checking /var/log/system.log error messages). Is this normal?

    Secondly, should the server’s git directory be syncing as I add files to my SparkleShare folder?

    Evan

      • Confirmed your command worked, thanks.

        Two other issues:

        1. Another machine I am setting up to use the same repo keeps getting an exit 129 error when cloning according to the logs, any ideas?

        2. My computer suffers a huge performance hit (to the point of other apps not functioning) when syncing. I am running OS X 10.6.6 on a Core 2 Duo 2GHz macbook (2006) with 2GB Ram.

  4. When you say “Create a bare git repository on your server”, do you mean log into the server, create a directory, then run git init? That is:

    ssh me@my.server.address
    mkdir my_dir_to_share
    cd my_dir_to_share
    git init

    ?
    If so, I too encounter the “something went wrong” error when attempting to add the server via the sparkleshare GUI. (I do have my server set up so that it has my publich ssh key and I never need a password to ssh to it, so presumably that’s not the issue…)

    • Ah, a hint of were the problem lies. In Terminal, the following

      mal:~ mike$ git clone ssh://me@my.server.address:my_dir_to_share

      Yields:

      Cloning into gigambr…
      ssh: connect to host port 22: Connection refused
      fatal: The remote end hung up unexpectedly

      The question remains why I can ssh fine (“telnet my.server.address 22” also works fine), but git on port 22 fails? …

  5. What format the address need to follow? Entering machine.domain.tld doesn’t allow me to continue. Is it “ssh://username@machine.domain.tld? Sorry, lost…

  6. Can’t help myself, but this is not working on my Mac… ;( poor documentation…

    Hukl, please be so kind an publish for the termnal the exact syntax from the start (symlink an existing git binary) and if possible cover also the key procedure….

    Woulde like to have a running share like shown in the video: http://www.youtube.com/watch?v=wmAyTntlv4k

    Thank you very much,
    Sascha

Leave a Reply

Your email address will not be published. Required fields are marked *