etckeeper pushing to github

view story

http://serverfault.com – I set up etckeeper and added the file /etc/etckeeper/commit.d/60github-push in order to push the commit to github. [orschiro@thinkpad etc]$ sudo cat /etc/etckeeper/commit.d/60github-push #!/bin/sh set -e if [ "$VCS" = git ] && [ -d .git ]; then cd /etc/ git push origin master fi However, pushing to github fails as etckeeper tries to push as root. Should the use of sudo not preserve my user account settings for git, including my ~/.ssh keys? [orschiro@thinkpad etc]$ sudo etckeeper commit "test" [master de5971c] test Author: orschiro <orschiro@thinkpad.(none)> 3 (HowTos)