From d66d85b0102826d2a231f92ff98ec58227739262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Wed, 11 Mar 2015 02:56:57 +0100 Subject: [PATCH] Added sharing gitconfig dotfiles Also added ignored files to pelicanconf. With the previous configuration, I would get an error with the devserver when using flycheck in emacs. --- content/2015-04-10-github-dotfiles.rst | 26 ++++++++++++++++++++++++++ pelicanconf.py | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 content/2015-04-10-github-dotfiles.rst diff --git a/content/2015-04-10-github-dotfiles.rst b/content/2015-04-10-github-dotfiles.rst new file mode 100644 index 0000000..2d00b5b --- /dev/null +++ b/content/2015-04-10-github-dotfiles.rst @@ -0,0 +1,26 @@ +Sharing dotfiles +################ +:date: 2015-04-10 17:47:00 +:tags: github, git, dotfiles + +Today's post is half a quick note, half public shaming. In other words, it is a reminder to be very careful with OAuth tokens and passwords. + +As part of moving to emacs, I starting using the incredibly useful `gh.el `_. +When you first use it, the extension saves either your password or an OAuth token in your .gitconfig file. +This is cool and convenient, unless you `happen to be publishing your .gitconfig file in a public repo `_. + +So, how can you still share your gitconfig without sharing your password/token with the rest of the world? +Since Git 1.7.0, you can `include other files in your gitconfig `_. + +.. code-block:: config + + [include] + path = ~/.gitconfig_secret + +And now, in your .gitconfig_secret file, you just have to add this: + +.. code-block:: config + + [github] + user = balkian + token = "< Your secret token >" diff --git a/pelicanconf.py b/pelicanconf.py index 79b6bed..774441f 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -54,3 +54,5 @@ EXTRA_PATH_METADATA = { 'extra/CNAME': {'path': 'CNAME'}, 'extra/favicon': {'path': 'favicon'}, } + +IGNORE_FILES = ['.*']