diff --git a/.github/workflows/sync_to_px4_msgs.yml b/.github/workflows/sync_to_px4_msgs.yml index 033a97e4173..0af384432d0 100644 --- a/.github/workflows/sync_to_px4_msgs.yml +++ b/.github/workflows/sync_to_px4_msgs.yml @@ -18,6 +18,9 @@ jobs: sync_to_px4_msgs: if: github.repository == 'PX4/PX4-Autopilot' runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false] + env: + # read by gh's git credential helper at push time + GH_TOKEN: ${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }} steps: - name: Checkout PX4 repo uses: actions/checkout@v6 @@ -26,10 +29,15 @@ jobs: run: | git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}" git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}" + # Hand the token to git through gh's credential helper instead of the clone URL. + # libcurl with the CVE-2026-94266 fix strips credentials from the effective URL, + # and git 2.55 mistakes that for a redirect and drops them, so a token embedded + # in the URL is never sent on push. + gh auth setup-git - name: Clone PX4_msgs repo run: | - git clone https://${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}@github.com/PX4/px4_msgs.git + git clone https://github.com/PX4/px4_msgs.git - name: Check out the same branch as the PX4 repo run: |