You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-10Lines changed: 22 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ What is dotfilesync?
6
6
7
7
dotfilesync is a bash script that syncs a list of local files that _you_ define, into a secret gist, that _you_ own.
8
8
9
-
dotfilesync is very easy to use as it stores your gist credentials into Mac OS X Keychain, so you don't have to provide it each time.
9
+
dotfilesync is very easy to use as it stores your gist credentials into an encrypted Keychain, so you don't have to provide it each time.
10
10
11
11
You are not limited to syncing only dotfiles. Although this tool is meant for you to sync local dotfiles, it can also be used to sync any file that can be synced with gist.
12
12
@@ -36,9 +36,13 @@ A sample config shape can look like this:
36
36
}
37
37
```
38
38
39
-
### Uses OS X Keychain
39
+
### Tools used as Keychain
40
40
41
-
The tool uses [OSX security](https://ss64.com/osx/security.html) command to manage your GitHub Personal Access Token within your Keychain. This way your token is safe and encrypted by the Keychain, and you don't have to provide it each time you run the command to sync files.
41
+
This tool stores and manage your GitHub Personal Access Token within into an encrypted Keychain. This way your token is safe and encrypted by the Keychain, and you don't have to provide it each time you run the command to sync files.
42
+
43
+
For OS X based operating systems, the [OSX security](https://ss64.com/osx/security.html) command is used.
44
+
45
+
For Linux based operating systems, the [secret-tools](http://www.linuxfromscratch.org/blfs/view/svn/gnome/libsecret.html) command is used to interact with [GnomeKeyring](https://wiki.gnome.org/Projects/GnomeKeyring). For more info about keyrings used on Linux systems [read this article](https://rtfm.co.ua/en/what-is-linux-keyring-gnome-keyring-secret-service-and-d-bus/#Linux_keyring_vs_gnome-keyring).
42
46
43
47
### Sync multiple files into a single secret gist
44
48
@@ -59,10 +63,18 @@ During a fetch operation (syncing local files from gist), a sync is performed, o
59
63
Prerequisites
60
64
-------------
61
65
62
-
This script uses [jq](https://stedolan.github.io/jq/download/) to parse the `config.json` on the local filesystem. You can run the following command on OS X, if you have [Homebrew](https://brew.sh/) installed:
66
+
This script uses [jq](https://stedolan.github.io/jq/download/) to parse the `config.json` on the local filesystem.
67
+
68
+
## OS X
69
+
You can run the following command on OS X, if you have [Homebrew](https://brew.sh/) installed:
63
70
64
71
brew install jq
65
72
73
+
## Linux
74
+
You can install the required packages on a Debian based distro running the following command:
75
+
76
+
apt-get install jq libsecret-tools
77
+
66
78
Installation
67
79
------------
68
80
@@ -77,13 +89,13 @@ Ensure the [prerequisite](#prerequisites) tools are setup. Installing dotfilesyn
@@ -98,7 +110,7 @@ Ensure the [prerequisite](#prerequisites) tools are setup. Installing dotfilesyn
98
110
99
111
You can create a new [person access tokens page](https://github.com/settings/tokens/new) for running the script on the command line. Follow [these instructions](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) on how to create one. Make sure you have the __gist__ scope selected to grant permission on this token.
100
112
101
-
Once you generate the personal access token, either copy it on your clipboard, or save it somewhere, since the script will need this to store within the OS X Keychain, before syncing your files in gist.
113
+
Once you generate the personal access token, either copy it on your clipboard, or save it somewhere, since the script will need this to store within the Keychain, before syncing your files in gist.
It is run only __once__ as part of the installation instructions. This command does the following:
126
138
127
-
* Prompts for your GitHub username and the personal access token. It then stores this information securely in the OS X Keychain.
139
+
* Prompts for your GitHub username and the personal access token. It then stores this information securely in the Keychain.
128
140
129
141
* Creates a new secret gist in your account with the description - "Generated by dotfilesync utility".
130
142
@@ -152,7 +164,7 @@ Commands
152
164
153
165
This command will do the following:
154
166
155
-
* Delete the saved GitHub gist credentials from the OS X Keychain.
167
+
* Delete the saved GitHub gist credentials from the Keychain.
156
168
* Delete `config.json` file from the `${HOME}/.dotfilesync` directory.
157
169
* It does not automatically delete the saved gist from your GitHub account. Rather, it prints out the HTTP link to your gist, so you can choose to delete it.
158
170
* It provides a link to the uninstall instructions in this README, so you can run the commands to delete the script and update the zsh config.
@@ -164,7 +176,7 @@ You can cleanup the script and all resources created by it, using the following
164
176
165
177
*__Run__`dfsync cleanup`
166
178
167
-
You can run the command to 1) Delete the saved GitHub gist credentials from the OS X Keychain 2) Delete `config.json` file from the `${HOME}/.dotfilesync` directory.
179
+
You can run the command to 1) Delete the saved GitHub gist credentials from the Keychain 2) Delete `config.json` file from the `${HOME}/.dotfilesync` directory.
0 commit comments