1
0
mirror of https://github.com/balkian/balkian.github.com.git synced 2024-11-14 15:42:28 +00:00
balkian.github.com/content/post/2015-04-10-github-dotfiles.md
J. Fernando Sánchez 7c3fb50312 Move to Hugo
2019-01-10 20:26:53 +01:00

1.1 KiB

title date tags
Sharing dotfiles 2015-04-10 17:47:00
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.

[include]
    path = ~/.gitconfig_secret

And now, in your .gitconfig_secret file, you just have to add this:

[github]
    user = balkian 
    token = "< Your secret token >"