Jan 25 2023
10:32 AM
- last edited on
Mar 05 2024
02:20 PM
by
TechCommunityAP
Jan 25 2023
10:32 AM
- last edited on
Mar 05 2024
02:20 PM
by
TechCommunityAP
Hi Team,
we are using Azure Devops and we have configure to use self hosted agent. The reason we need to talk to our internal Network
I have a script like below
$URL= 'XXX
$output = Invoke-WebRequest -Uri $URL -UseBasicParsing -Method GET -ContentType "application/json" -ErrorAction silentlycontinue
# Gather password from Content property & convert from JSON
$x = $output.Content | ConvertFrom-Json
$PAPassword = $x.Content
# Secure the password
$SecuredPAPassword = ConvertTo-SecureString $PAMPassword -AsPlainText -Force
Every tine I run it from the Pipeline, i get the below error
The remote server returned an error: (404) Not Found.
when I run it from the Server where my self hosted agent is running it works successfully.
Why I cant run it from the Pipeline Since pipeline is using the same self hosted agent?
Can you Please help me on this?
Thanks,
Sujith.
Jan 25 2023 07:27 PM
Jan 25 2023 07:59 PM
@varunmittal Thanks for replying.
Checked the url and not using any environment variables.
I Want to understand when you say server is not accessible from the pipeline.
My understanding is like when i create the self hosted agent the pipeline is running on that server not on the devops. So if my scripts from self hosted agent server it should also run from pipeline right?
Pleas correct my understanding.
Jan 25 2023 08:44 PM
Jan 25 2023 11:54 PM