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

Tiny example.

Log.

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.

steps:
      - uses: actions/checkout@v1
      - shell: powershell
        run: |
          set-strictmode -version 3.0
          set-psdebug -trace 2
          . .\tst.ps1
        env:
          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).