Closed TItan371 closed 7 months ago
You will definitely want to create a new token/ you may already have to, as github has likely revoked it since it was still in the remote link when you copied the script output.
in the klipper-backup folder if you do git log what is the latest commit message you see?
Could you try removing the config_backup folder and then try running the script again.
Sorry meant running script.sh again. I only needed to see the first entry of git log just wanted to be sure it true was reporting it was up to date properly.
03:25:56 PM $ BACKUP_CFG 03:25:56 PM // Running Command {update_git_script}...: 03:25:57 PM // Klipper-backup is up to date 03:25:58 PM // hint: Pulling without specifying how to reconcile divergent branches is // hint: discouraged. You can squelch this message by running one of the following // hint: commands sometime before your next pull: // hint: // hint: git config pull.rebase false # merge (the default strategy) // hint: git config pull.rebase true # rebase // hint: git config pull.ff only # fast-forward only // hint: // hint: You can replace "git config" with "git config --global" to set a default // hint: preference for all repositories. You can also pass --rebase, --no-rebase, // hint: or --ff-only on the command line to override the configured default per // hint: invocation. 03:25:59 PM // From https://github.com/TItan371/MinionKlipperBackUP // * branch main -> FETCH_HEAD 03:26:00 PM // fatal: refusing to merge unrelated histories 03:26:00 PM // Skipping symbolic link: printer_data/config/fluidd.cfg // Skipping symbolic link: printer_data/config/KAMP 03:26:00 PM // Skipping symbolic link: printer_data/config/K-ShakeTune 03:26:00 PM // Skipping symbolic link: printer_data/config/timelapse.cfg 03:26:00 PM // On branch main // nothing to commit, working tree clean 03:26:01 PM // From https://github_pat_@github.com/TItan371/MinionKlipperBackUP.git 03:26:02 PM // To https://github.com/TItan371/MinionKlipperBackUP.git // ! [rejected] main -> main (non-fast-forward) 03:26:02 PM // error: failed to push some refs to 'https://github.com/TItan371/MinionKlipperBackUP.git' 03:26:02 PM // 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. 03:26:02 PM // Command {update_git_script} finished
where you previously running the klipper-backup script to that repository or was there already previous data and commits from another system/manual backups. Usually if you are getting a warning about histories not matching its because the commits vary to greatly and the histories are not aligned.
As well the password error is from not having the token set in .env
03:43:16 PM $ BACKUP_CFG 03:43:16 PM // Running Command {update_git_script}...: 03:43:17 PM // Klipper-backup is up to date 03:43:18 PM // hint: Pulling without specifying how to reconcile divergent branches is // hint: discouraged. You can squelch this message by running one of the following // hint: commands sometime before your next pull: // hint: // hint: git config pull.rebase false # merge (the default strategy) // hint: git config pull.rebase true # rebase // hint: git config pull.ff only # fast-forward only // hint: // hint: You can replace "git config" with "git config --global" to set a default // hint: preference for all repositories. You can also pass --rebase, --no-rebase, // hint: or --ff-only on the command line to override the configured default per // hint: invocation. 03:43:19 PM // From https://github.com/TItan371/MinionKlipperBackUP // * branch main -> FETCH_HEAD 03:43:19 PM // fatal: refusing to merge unrelated histories 03:43:19 PM // Skipping symbolic link: printer_data/config/fluidd.cfg // Skipping symbolic link: printer_data/config/KAMP 03:43:19 PM // Skipping symbolic link: printer_data/config/K-ShakeTune 03:43:19 PM // Skipping symbolic link: printer_data/config/timelapse.cfg 03:43:19 PM // On branch main // nothing to commit, working tree clean 03:43:21 PM // From https://github_pat_@github.com/TItan371/MinionKlipperBackUP.git 03:43:22 PM // To https://github.com/TItan371/MinionKlipperBackUP.git // ! [rejected] main -> main (non-fast-forward) // error: failed to push some refs to 'https://github.com/TItan371/MinionKlipperBackUP.git' 03:43:22 PM // 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. 03:43:22 PM // Command {update_git_script} finished
i find this https://github.com/Staubgeborener/klipper-backup/issues/18. can you help me where shold i put this cmd git push --force
where you previously running the klipper-backup script to that repository or was there already previous data and commits from another system/manual backups. Usually if you are getting a warning about histories not matching its because the commits vary to greatly and the histories are not aligned.
As well the password error is from not having the token set in .env
As noted in the above were you using a different backup system before or was the repo you are trying to push to used for something else prior to using klipper-backup?
before this i use ssh to download all file and this is my first time use my github repositories.
Ahh ok so the best option I would say is to create a new repository to use the script with and then verify all the files you backed up match the old repository.
Then you can delete the old repository since it wouldn't be needed.
This issue is stale because it has been open for 14 days with no activity.
because i still can't get it work so i giveup , back to old backup way .
You could try to delete the folders
rm -rf ~/config_backup
rm -rf ~/klipper-backup
And follow this pretty good video together with the docs.
This issue is stale because it has been open for 14 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
What happened
// ! [rejected] main -> main (non-fast-forward) 01:11:31 PM // error: failed to push some refs to 'https://github.com/TItan371/MinionKlipperBackUP.git' 01:11:31 PM // 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. 01:11:31 PM // Command {update_git_script} finished
What did you expect to happen
update finish
How to reproduce
run script.sh
Additional information
01:11:25 PM // Running Command {update_git_script}...: 01:11:26 PM // Klipper-backup is up to date 01:11:27 PM // hint: Pulling without specifying how to reconcile divergent branches is // hint: discouraged. You can squelch this message by running one of the following // hint: commands sometime before your next pull: // hint: // hint: git config pull.rebase false # merge (the default strategy) // hint: git config pull.rebase true # rebase // hint: git config pull.ff only # fast-forward only // hint: // hint: You can replace "git config" with "git config --global" to set a default // hint: preference for all repositories. You can also pass --rebase, --no-rebase, // hint: or --ff-only on the command line to override the configured default per // hint: invocation. 01:11:29 PM // From https://github.com/TItan371/MinionKlipperBackUP // * branch main -> FETCH_HEAD 01:11:29 PM // 1c88d65..9e10ff9 main -> origin/main 01:11:29 PM // fatal: refusing to merge unrelated histories 01:11:29 PM // Skipping symbolic link: printer_data/config/fluidd.cfg 01:11:29 PM // Skipping symbolic link: printer_data/config/KAMP 01:11:29 PM // Skipping symbolic link: printer_data/config/K-ShakeTune 01:11:29 PM // Skipping symbolic link: printerdata/config/timelapse.cfg 01:11:29 PM // On branch main // nothing to commit, working tree clean 01:11:30 PM // From https://github@github.com/TItan371/MinionKlipperBackUP.git 01:11:31 PM // To https://github.com/TItan371/MinionKlipperBackUP.git // ! [rejected] main -> main (non-fast-forward) 01:11:31 PM // error: failed to push some refs to 'https://github.com/TItan371/MinionKlipperBackUP.git' 01:11:31 PM // 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. 01:11:31 PM // Command {update_git_script} finished
env file
github_username=TItan371 github_repository=MinionKlipperBackUP branch_name=main commit_username="TItan371"