Networking

How to install SparkleShare on Ubuntu and connect it to GitHub

Collaboration and remote sync are a necessity for developers. Learn how to make the process easier by using SparkleShare to connect to a GitHub repository.

Image: Jack Wallen

SparkleShare is a unique self-hosted service that not only allows you to do file syncing/sharing, but it can also do version control, client-side encryption, and connect and sync with your GitHub account. This makes it a great file syncing tool for developers.

Although SparkleShare allows you to set up your own, in-house server, there are times when syncing with GitHub is more practical. For this, I'll show how to install SparkleShare on a Ubuntu 16.04 machine, and connect your new installation to your pre-existing GitHub account. Once it's set up, you can easily sync all your work to a repository and share it out.

SEE: Job Description: Quality Assurance Engineer (Tech Pro Research)

What you'll need

I'll be demonstrating this on a Ubuntu 16.04 desktop, so you'll need that up and running. You'll also need to know your GitHub username and have a GitHub repository ready to go.

Installing SparkleShare

Fortunately, SparkleShare can be found on the standard Ubuntu repositories, so installation is simple.

  1. Open a terminal window.
  2. Update apt with the command sudo apt-get update.
  3. Type your sudo password and hit Enter.
  4. Once the update is complete, issue the command sudo apt-get install -y sparkleshare.
  5. Allow the installation to complete.

When the installation finishes, open the Unity Dash or your desktop menu and type sparkleshare; you should see the icon for the software appear. Click the SparkleShare launcher to open the first run wizard.

Setting up SparkleShare

When you launch SparkleShare for the first time, you'll be required to walk through a welcome wizard. You'll enter your name and email (Figure A), and then once the wizard is complete be given an SSH public key that will be required to connect to your GitHub account.

Figure A

Figure A
Image: Jack Wallen

The SparkleShare first run wizard in action.

After the setup wizard is complete, click the SparkleShare icon in the notification area and then select SparkleShare | Add Hosted Project. In the resulting window (Figure B), click GitHub.

Figure B

Figure B
Image: Jack Wallen

Adding a GitHub hosted project to SparkleShare.

Before you continue, you must import your SparkleShare public key into your GitHub account.

  1. Open a terminal window.
  2. Issue the command cd ~/.config/sparkleshare.
  3. Find the name of your .pub key with the command ls (it will end in .pub).
  4. Open the pub key with a text editor and copy the contents.
  5. Open your GitHub account in your desktop browser.
  6. Go to Settings | SSH and GPG keys.
  7. Click New SSH Key.
  8. Title the key SparkleShare.
  9. Copy the contents of your SparkleShare pub key into the Key text area (Figure C).
  10. Click Add SSH Key.

Figure C

Figure C
Image: Jack Wallen

Adding the SparkleShare SSH key to GitHub.

Go back to the SparkleShare hosted project setup window and enter your username/project in the required field. The username is your GitHub username, and the project is the name of the GitHub repository to be used with SparkleShare. Then, click Add, and SparkleShare will link to the GitHub repository.

Now you can add to the GitHub repository by adding files to ~/SparkleShare/REPOSITORY (REPOSITORY is the name of the GitHub repository).

Congratulations! You've connected SparkleShare to your GitHub repository. If you're looking to add team members, you can follow the same steps on their desktop machines, and then they'll be able to sync with your GitHub repository.

A powerful tool

If you're a developer (especially of an open source nature), you most likely depend upon GitHub. If you need a simple way to keep your work in sync with a repository, SparkleShare is ready to serve.

Also see

About Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website jackwallen.com.

Editor's Picks

Free Newsletters, In your Inbox