From 662d5ec5bfd9e2607c25ae74db4e8847472c72e7 Mon Sep 17 00:00:00 2001 From: Wei Wu Date: Fri, 14 Jul 2023 13:46:51 -0400 Subject: [PATCH] Fix git command bugs in Windows --- dist/platforms/windows/set_gitcredential.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/platforms/windows/set_gitcredential.ps1 b/dist/platforms/windows/set_gitcredential.ps1 index afb947c6..2c412928 100644 --- a/dist/platforms/windows/set_gitcredential.ps1 +++ b/dist/platforms/windows/set_gitcredential.ps1 @@ -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://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 --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:" + 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 -------------"