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
313313 $ErrorActionPreference = ' Stop'
314314 # Get app-level deployment credentials
315315 $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)
318318 $remoteName = " azure"
319+ $url = (" https://$username " + ' :' + " $password @$ ( $WebApp.EnabledHostNames [1 ]) " )
319320 # 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 "
321322 Invoke-Expression - Command $command | Out-Null
322323 if ($gitOutPut ) {
323324 $repoAdded = $false
You can’t perform that action at this time.
0 commit comments