unity-builder/dist/platforms/windows/set_gitcredential.ps1
Andrew Kahr ff23166e30
Parity Fixes with Test Runner (QOL Changes) (#607)
* Fix missed directory change that isn't used anymore

* Fixes, improvements, and cleanup while reconciling test runner scripts

* Additional cleanup

* Fix possible hang

* Don't mislead with activation server on windows

* Update node version
2023-12-12 22:10:57 -08:00

21 lines
973 B
PowerShell

if ($null -eq ${env:GIT_PRIVATE_TOKEN}) {
Write-Host "GIT_PRIVATE_TOKEN unset skipping"
}
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://git@github.com/"
git config --global --add "url.https://token:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "git@github.com"
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://git@github.com/"
git config --global "url.https://git:$env:GIT_PRIVATE_TOKEN@github.com/".insteadOf "git@github.com:"
}
Write-Host "---------- git config --list -------------"
git config --list
Write-Host "---------- git config --list --show-origin -------------"
git config --list --show-origin