I'd like to keep some of the folders in my /etc/ dir git-revised, cause I'm quite new to server administration and am constantly messing around in my /etc/nginx/ and /etc/bind/ directories.
I've heard of people git-revising their either /etc/ directories, but that seems a bit like overkill, as at this point I'm only messing in those 2 subdirectories.
The problem I'm having is that if I sudo my git operations, I don't have the right pubkeys to push to my remote repo (bitbucket). But if I don't sudo, I need to mess around with all the permissions (again, not very pro at this).
Does anyone know best practices for managing their configs? or how I should solve this problem?
Thanks, Dean.
PS. It's Ubuntu 12.04, Git, nginx, bind9, amazon aws, bitbucket...
Make it hierarchical.
Have an ordinary user use bitbucket as the remote and store the repo in their home directory. Then have
/etc/
use the repo in the homedir as the remote.In other words...
root
in/etc
/ has remote of/home/dean-rather/git/etc/
.dean-rather
in/home/dean-rather/git/etc/
has remote ofgit://[email protected]/dean-rather/etc.git
.