Skip to content

Github Sync

davidbannon edited this page Oct 4, 2021 · 13 revisions

Github Sync

Draft - applies to beta release of tomboy-ng v0.33d. Available from the github release page. If you use this, please report your experiences, good or bad.

Overview

You can use Github Sync in the same way as File Sync or Tomboy's Network Sync, sync to it with one to many instances of tomboy-ng on Linux, Windows or MacOS. Keeps all your notes available and, incidentally provides a useful backup.

In addition, syncing to Github allows you to access your notes through Github's pretty reasonable Markdown editor. So, view and edit using your phone, tablet or a friend's computer. Need nothing but a browser.

Security and Privacy

Everyone has a different view of these issues. When you move your notes into a cloud service, any cloudservice, you need to consider your need for security and privacy. Github allows you to set a repository as private, denying assess to anyone you have not authorised. But how securely ? And does Github staff have access, maybe they are required by civil authorities to disclose your content ?

Github Sync in tomboy-ng allows "selective sync" - only notes in a particular Notebook, SyncGithub are moved to Github. Clearly, this is no longer a general purpose sync service if you take that approach, its your choice. You can use both File Sync and Github Sync on the same notes repository, in this model, Github is just there to allow mobile access to those notes you select.

You also need to consider if using Github Sync exposes other content you may have on Github.

In use, tomboy-ng is given an Access Token you generate in Github. This token will allow access (read AND write) to all your Github repository. It is stored in tomboy-ng's config with only minimal attempt to obfuscate. If someone has unfettered access to your computer and medium IT skills, they can get to that token. If this is not acceptable to you, do not use this service (and perhaps tell me, maybe I add a password at tomboy-ng startup ?).

Requirements

Pretty simple, tomboy-ng 0.34 (or 0.33d for the risk takers) and a github account, network access. Github accounts are free. Github puts a limit of 5000 "accesses" per day, that could be a problem for people with very large note collections but, IMHO, the mobile access model might be a bit awkward with all of a large collection uploaded anyway. Paid Github accounts do not have that 5000 per day limit.

SetUp

  • Firstly, decide now if you will use a "selective sync" or sync your full repository. You can change later (easy to remove and recreate the repo) but better to get it right the first time. If its selective, create a tomboy-ng notebook called SyncGithub (yes, cases sensitive, no space) and maybe add some notes to it.

  • Next, if you don't already have a Github account (or want a separate one for this purpose) go to https://github.com and create that account.

  • Finally, back in tomboy-ng (0.33d or later), click the menu, Settings, Sync tab. Set the Sync Type to Github (this will not affect your File Sync if you have one). Now, you need two things, the github username, and a Github Token (see below), enter them and click Setup. If you have a lot of notes, its likely be a bit slow from here on.

Access Token

Have you read the last paragraph of the Security and Privacy section ? Please read it again.

Github's preferred access model involves a security Token, its a 40 character "word" you generate on their website when logged in. For tomboy-ng's purposes, the default token is fine, don't give it any more permissions. This token could potentially allow someone with access to your computer to mess with your Github repositories.

Go to https://github.com/settings/tokens/new enter some arbitrary note in the field, don't enable any of the boxes, choose what you think is a reasonable expire time and hit the green "generate Token" button. Copy the text of the token into your clipboard and paste it into tomboy-ng's Token field.

If you are replacing an expired token, paste it over the existing one (ensuring none of the existing one is left) and click the Sync Enabled tick box, off and then again to turn it back on.

Clone this wiki locally