From 80872a32baa61f41249b5ab1d9fa4c9c0578c489 Mon Sep 17 00:00:00 2001 From: avelytchko <919635+avelytchko@users.noreply.github.com> Date: Fri, 13 Mar 2026 16:46:47 +0100 Subject: [PATCH 1/3] Modify git push command for safer force push Updated git push command to use --force-with-lease. --- .github/workflows/github-action-push-to-remote.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-action-push-to-remote.yml b/.github/workflows/github-action-push-to-remote.yml index 2e0b79e..7f69ec9 100644 --- a/.github/workflows/github-action-push-to-remote.yml +++ b/.github/workflows/github-action-push-to-remote.yml @@ -31,4 +31,4 @@ jobs: echo "${{ secrets.GIT_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519 && git remote add ${{ secrets.GIT_USERNAME }} ${{ secrets.GIT_USERNAME }}@${{ secrets.GIT_REMOTE_HOST }}:${{ secrets.GIT_REMOTE_SERVICE }} && - GIT_SSH_COMMAND='ssh -o "StrictHostKeyChecking no" -o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" -i ~/.ssh/id_ed25519' git push ${{ secrets.GIT_USERNAME }} + GIT_SSH_COMMAND='ssh -o "StrictHostKeyChecking no" -o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" -i ~/.ssh/id_ed25519' git push ${{ secrets.GIT_USERNAME }} --force-with-lease From 375452b0e13093509e2f9a2f4b3db5a43243e445 Mon Sep 17 00:00:00 2001 From: avelytchko <919635+avelytchko@users.noreply.github.com> Date: Fri, 13 Mar 2026 16:58:07 +0100 Subject: [PATCH 2/3] Modify git push command in workflow Removed the --force-with-lease option from the git push command in the GitHub Actions workflow. --- .github/workflows/github-action-push-to-remote.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-action-push-to-remote.yml b/.github/workflows/github-action-push-to-remote.yml index 7f69ec9..2e0b79e 100644 --- a/.github/workflows/github-action-push-to-remote.yml +++ b/.github/workflows/github-action-push-to-remote.yml @@ -31,4 +31,4 @@ jobs: echo "${{ secrets.GIT_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519 && git remote add ${{ secrets.GIT_USERNAME }} ${{ secrets.GIT_USERNAME }}@${{ secrets.GIT_REMOTE_HOST }}:${{ secrets.GIT_REMOTE_SERVICE }} && - GIT_SSH_COMMAND='ssh -o "StrictHostKeyChecking no" -o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" -i ~/.ssh/id_ed25519' git push ${{ secrets.GIT_USERNAME }} --force-with-lease + GIT_SSH_COMMAND='ssh -o "StrictHostKeyChecking no" -o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" -i ~/.ssh/id_ed25519' git push ${{ secrets.GIT_USERNAME }} From 18c20381a89880a45e0ddc73426fae466a9e3f75 Mon Sep 17 00:00:00 2001 From: avelytchko <919635+avelytchko@users.noreply.github.com> Date: Fri, 13 Mar 2026 17:24:20 +0100 Subject: [PATCH 3/3] Force push in GitHub Action workflow Updated the Git push command to use the --force option. --- .github/workflows/github-action-push-to-remote.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-action-push-to-remote.yml b/.github/workflows/github-action-push-to-remote.yml index 2e0b79e..9ce9e76 100644 --- a/.github/workflows/github-action-push-to-remote.yml +++ b/.github/workflows/github-action-push-to-remote.yml @@ -31,4 +31,4 @@ jobs: echo "${{ secrets.GIT_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519 && git remote add ${{ secrets.GIT_USERNAME }} ${{ secrets.GIT_USERNAME }}@${{ secrets.GIT_REMOTE_HOST }}:${{ secrets.GIT_REMOTE_SERVICE }} && - GIT_SSH_COMMAND='ssh -o "StrictHostKeyChecking no" -o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" -i ~/.ssh/id_ed25519' git push ${{ secrets.GIT_USERNAME }} + GIT_SSH_COMMAND='ssh -o "StrictHostKeyChecking no" -o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" -i ~/.ssh/id_ed25519' git push ${{ secrets.GIT_USERNAME }} --force