File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
experiments/Websites.Experiments Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -313,11 +313,12 @@ function Add-Remote
313
313
$ErrorActionPreference = ' Stop'
314
314
# Get app-level deployment credentials
315
315
$xml = [xml ](Get-AzureRmWebAppPublishingProfile - Name $WebApp.Name - ResourceGroupName $WebApp.ResourceGroup - OutputFile null)
316
- $username = $xml.SelectNodes (" //publishProfile[@publishMethod=`" MSDeploy`" ]/@userName" ).value
317
- $password = $xml.SelectNodes (" //publishProfile[@publishMethod=`" MSDeploy`" ]/@userPWD" ).value
316
+ $username = [ System.Uri ]::EscapeDataString( $xml.SelectNodes (" //publishProfile[@publishMethod=`" MSDeploy`" ]/@userName" ).value)
317
+ $password = [ System.Uri ]::EscapeDataString( $xml.SelectNodes (" //publishProfile[@publishMethod=`" MSDeploy`" ]/@userPWD" ).value)
318
318
$remoteName = " azure"
319
+ $url = (" https://$username " + ' :' + " $password @$ ( $WebApp.EnabledHostNames [1 ]) " )
319
320
# Add the Azure remote to a local Git respository
320
- $command = " git -C $GitRepositoryPath remote add $remoteName 'https:// ${username} : $password @ $ ( $WebApp .EnabledHostNames [ 0 ] ) ' " + " 2> $gitOutput "
321
+ $command = " git -C $GitRepositoryPath remote add $remoteName $url "
321
322
Invoke-Expression - Command $command | Out-Null
322
323
if ($gitOutPut ) {
323
324
$repoAdded = $false
You can’t perform that action at this time.
0 commit comments