Skip to content

Instantly share code, notes, and snippets.

@zhovner
Created February 5, 2013 18:02
Show Gist options
  • Save zhovner/4716335 to your computer and use it in GitHub Desktop.
Save zhovner/4716335 to your computer and use it in GitHub Desktop.
etckeeper setup with bitbucket repo
# После установки etckeeper
/etc/etckeeper/etckeeper.conf VCS="git"
etckeeper init && etckeeper commit
# ------
git config --global user.name "My Machine"
git config --global user.email "etckeeper@my.machine"
# ------
Создать приватный реп bitbucket.org
добавить ssh ключ на сайте
cd /etc && git remote add origin ssh://git@bitbucket.org/USERNAME/REPO-NAME.git
echo “git show --stat” > /etc/.git/hooks/post-commit
echo "git push origin master" >> /etc/.git/hooks/post-commit
chmod +x /etc/.git/hooks/post-commit
# ------
крон /etc/cron.daily/etckeeper
@vvasuki
Copy link

vvasuki commented Dec 14, 2017

I did the above barring

git config --global user.name "My Machine"
git config --global user.email "etckeeper@my.machine"

Push fails, as expected, with:

Warning: Permanently added 'bitbucket.org,104.192.143.2' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

What's the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment