linux:push_to_git
This is an old revision of the document!
Table of Contents
Auto push_to_git script
Documentation | |
---|---|
Name: | Auto pushtogit script |
Description: | Automatic push changes to git (noprompt). |
Modification date : | 29/04/2019 |
Owner: | dodger |
Notify changes to: | dodger |
Tags: |
Instructions
Get script on gitea
Pre-Requisites
On git*:
- Create a repository in which the auto push will upload the data
- Generate a ssh keypair in the source host.
- Add the public ssh key to the repository with write permissions.
On the machine pushtogit will run:
- Make the 1st pull into the directory.
- Add all the files.
- Run
pushtogit
manually and check if it works.
Setup
Add the directories to pushtogit.config
:
- push_to_git.config
FOLDERS="/home/www/dokuwiki.ciberterminal.net"
Add the script to crontab:
cat >>/etc/crontab<<EOF # AUTO push_to_git folders 0 * * * * root /home/dodger/push_to_git/push_to_git.sh EOF
usage
bash /home/dodger/push_to_git/push_to_git.sh
linux/push_to_git.1644579408.txt.gz · Last modified: 2022/02/11 11:36 by 127.0.0.1