Etckeeper: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 27: Zeile 27:
 
=Set the upstream and push.=
 
=Set the upstream and push.=
 
*git push -u origin master
 
*git push -u origin master
 +
=Handling=
 +
*echo 8.8.4.4    google2 >> /etc/hosts
 +
*git commit -a -m  hosts
 +
*git push
  
 
=Links=
 
=Links=
 
*https://www.thomas-krenn.com/de/wiki/Etc-Verzeichnis_mit_etckeeper_versionieren
 
*https://www.thomas-krenn.com/de/wiki/Etc-Verzeichnis_mit_etckeeper_versionieren
 
*https://coderwall.com/p/v1agsg/installing-etckeeper-to-store-config-with-autopush-to-git-in-ubuntu-14-04-lts
 
*https://coderwall.com/p/v1agsg/installing-etckeeper-to-store-config-with-autopush-to-git-in-ubuntu-14-04-lts

Version vom 27. Februar 2018, 16:07 Uhr

Install

  • apt-get install git etckeeper

ssh key to the git server

  • ssh-copy-id git@caprica

Config

  • /etc/etckeeper/etckeeper.conf
VCS="git"
GIT_COMMIT_OPTIONS=""
HG_COMMIT_OPTIONS=""
BZR_COMMIT_OPTIONS=""
DARCS_COMMIT_OPTIONS="-a"
AVOID_DAILY_AUTOCOMMITS=1
AVOID_COMMIT_BEFORE_INSTALL=1
HIGHLEVEL_PACKAGE_MANAGER=apt
LOWLEVEL_PACKAGE_MANAGER=dpkg
PUSH_REMOTE="origin"

Go to the configuration directory.

  • cd /etc

Initialize etckeeper

  • etckeeper init

Add the remote repository.

  • git remote add origin git@HOSTNAME:REPONAME

First commit.

  • etckeeper commit "Initial commit."

Set the upstream and push.

  • git push -u origin master

Handling

  • echo 8.8.4.4 google2 >> /etc/hosts
  • git commit -a -m hosts
  • git push

Links