os-git-backup 'pre-receive hook declined'

Started by avila4, July 29, 2024, 08:50:48 PM

Previous topic - Next topic
I perform backups using git-backup, but I've noticed that it no longer works.

When I click on setup/Test Git via the graphical interface, this is returned:

"""unknown error, check log for details
Saved settings, but remote backup failed.""""

When I execute the push via the terminal, this happens:

! [remote rejected] master -> master (pre-receive hook declined)

error: failed to push some refs to 'ssh://xxxxxx.xxx/backup-opn.git'

This process used to work fine, I can execute pull normally, permissions on the remote server have not changed, but in any case I removed any lock on the remote server and it always returns the same error.

I struggled with something like this as well - however, I think it is another problem:

I guess that you fiddled around with either VMs or boot environments, such that your installation got out of sync with the local version.

I found out the hard way that there are two conditions that make the git backup work:

1. You either have to have a completely in-sync installation - which can get destroyed by just restoring a config to another (or the same) machine.

2. If you want to start over, "rm -rf /conf/backup/git" alone does potentially not suffice, you have to clear out /conf/event_config_changed.json as well and start with a bare git repository.


Be sure to read the documentation on cleanup to the end, including the tips!
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 770 up, Bufferbloat A

Thanks for sharing this information, I tried option 2, since I hadn't removed event_config_changed.json, but unfortunately it didn't work.

I'll have to look for other options, I've been seeing this problem with git-backup for a long time, but without success.