Skip to content

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

Answered by weide-zhou
dewyatt asked this question in Actions
Discussion options

You must be logged in to vote

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'

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants