[BUG] git clone always fails after first call in Windows

Tiny example.


I emailed a bug report to support but didn’t hear back just yet and figured I ought to post here and see if anyone has experienced this.

Am I just lacking sleep?

Git command output are done on stderr not stdout, so you need to pipe stderr.   Set GIT_REDIRECT_STDERR=’2>&1’ for env first, code as below, please refer to the link for more details.

      - uses: actions/checkout@v1
      - shell: powershell
        run: |
          set-strictmode -version 3.0
          set-psdebug -trace 2
          . .\tst.ps1
          GIT_REDIRECT_STDERR: '2>&1'

1 Like

Thank you much for the workaround! I see folks on Azure are having issues with this as well (here).