Staubgeborener / Klipper-Backup

Klipper backup script for manual or automated GitHub backups. Lightweight, pragmatic and comfortable.
https://klipperbackup.xyz
264 stars 50 forks source link

Klipper back up error #118

Closed coros25 closed 1 month ago

coros25 commented 1 month ago

I am new to using the klipper backup command and when I run the macro, I see the following errors. Here is the terminal log when running the macro:

10:58 AM Command {update_git_script} finished 10:58 AM hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. 10:58 AM error: failed to push some refs to 'https://github.com/coros25/Voron0.2.git' 10:58 AM To https://github.com/coros25/Voron0.2.git ! [rejected] main -> main (non-fast-forward) 10:58 AM From https://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@github.com/coros25/Voron0.2.git 10:58 AM On branch main nothing to commit, working tree clean 10:58 AM Skipping symbolic link: printer_data/config/timelapse.cfg 10:58 AM Skipping symbolic link: printer_data/config/mainsail.cfg 10:58 AM Skipping symbolic link: printer_data/config/KAMP 10:58 AM fatal: refusing to merge unrelated histories 10:58 AM From https://github.com/coros25/Voron0.2

Staubgeborener commented 1 month ago

I guess either one of these two things:

  1. you didn't follow the documentation
  2. or you try to push the files to a repository which already exists

The error message is about having a repository at GitHub which has a different commit history as the local one. So you have changes on the remote branch that don't exists locally. Mostly this happens while trying to push a commit to a repository which already exists with files.

So I would suggest the following: try ./script.sh --fix (you need the current release for this!) and see if you can run the script afterwards without the --fix parameter.

If this doesn't work, try to push your backup to another repository. So create a new one on GitHub with a new token, rerun the installation script with the new information and push your backup to the new repository. If this works, delete the old repository because you will not need this anymore.

Edit: just checked your profile, I guess you try to push your backup to this repository.

coros25 commented 1 month ago

Yep you were right! Works like a charm just creating a new repository. Thank you so much!