opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
810 stars 593 forks source link

os-git-backup tries to delete master branch #4051

Open marrobHD opened 1 week ago

marrobHD commented 1 week ago

Important notices Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug OPNsense Git Backups stopped working a month ago. git-backup tries to remove the master branch, which is the default thus cannot be deleted.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'System -> Configuration -> Backups'
  2. Click on 'Setup/Test Git'
  3. See error

Expected behavior The plugin should not try to delete the branch.

Relevant log files

git-backup unknown error, check log for details (remote: remote: Gitea: branch master is the default branch and cannot be deleted To https://gitea.local.theghostsip.eu/TechHome/Opnsense-Backups.git ! [remote rejected] master (pre-receive hook declined) error: failed to push some refs to 'https://domain/TechHome/Opnsense-Backups.git' )

Environment OPNsense 24.1.9_3 (amd64).

bkeifer commented 15 hours ago

Also seeing this here, though the branch is 'main' for me. Environment is OPNsense 24.1.9_4-amd64

<171>1 2024-06-28T13:25:19-04:00 git.example.net config 37942 - [meta sequenceId="1"] git-backup unknown error, check log for details (error: unable to delete 'main': remote ref does not exist error: failed to push some refs to 'ssh://githost.lan:222/opnsense/config.git' )