Skip to content

Commit

Permalink
fix(windows): replacing of urls if gitPrivateToken is set (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
kijz authored May 17, 2024
1 parent f2250e9 commit 461ecf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/platforms/windows/set_gitcredential.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ else {
Write-Host "GIT_PRIVATE_TOKEN is set configuring git credentials"

git config --global credential.helper store
git config --global --replace-all "url.https://token:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "ssh://[email protected]/"
git config --global --add "url.https://token:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "[email protected]"
git config --global --add "url.https://token:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "https://github.com/"
git config --global --replace-all url."https://token:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "ssh://[email protected]/"
git config --global --add url."https://token:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "[email protected]"
git config --global --add url."https://token:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "https://github.com/"

git config --global "url.https://ssh:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "ssh://[email protected]/"
git config --global "url.https://git:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "[email protected]:"
git config --global url."https://ssh:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "ssh://[email protected]/"
git config --global url."https://git:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "[email protected]:"
}

Write-Host "---------- git config --list -------------"
Expand Down

0 comments on commit 461ecf7

Please sign in to comment.