Epinova / epinova-dxp-deployment

DXP deployment with Azure DevOps release tasks
MIT License
14 stars 11 forks source link

Unable to resolve package source 'https://www.powershellgallery.com/api/v2 #79

Closed samwest88 closed 3 years ago

samwest88 commented 3 years ago

On the Deploy to (Episerver DXP) Task (the first one we run), we get the error:

2021-02-15T09:35:27.1952022Z ##[warning]Unable to resolve package source 'https://www.powershellgallery.com/api/v2'. 2021-02-15T09:35:27.3100586Z ##[error]No match was found for the specified search criteria and module name 'EpiCloud'. Try Get-PSRepository to see all available registered module repositories. 2021-02-15T09:35:27.4036161Z ##[error]The term 'Connect-EpiCloud' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I strongly suspect from my google adventures that this may be a TLS thing. I tried running the powershell script on the agent just before:

To try and force it to use TLS 1.2, but to no avail.

Not sure if this is one you know about as I didn't see it on your Problems page at: https://github.com/Epinova/epinova-dxp-deployment/blob/develop/documentation/Problems.md

ovelartelius commented 3 years ago

Hi Sam Thanks for reporting this issue. I have created a issue that should solve this problem. https://github.com/Epinova/epinova-dxp-deployment/issues/67 We have experienced this before when https://www.powershellgallery.com went down a couple of hours during fall. So I think that the solution is to implement the EpiCloud module into the extension. Is this a problem you still have or is it working at the moment?

samwest88 commented 3 years ago

Ah yes that looks like it could be the one alright, or at least similar. It's a problem we currently have (just gave it another kick this morning to make sure). Not sure if there are any workarounds for it?

ovelartelius commented 3 years ago

Hmmm. No I don´t know a quick workaround right now. Doing some tests at the moment to see if I can generate this problem. Are you running in Azure DevOps Server or Services?

samwest88 commented 3 years ago

I'm using an Azure DevOps Build Agent with the following capabilities:

Agent.Name | mtmbuildagent01 |   |     | Agent.Version | 2.165.0 |   |     | Agent.ComputerName | vm-vsts-w5vmej |   |     | Agent.HomeDirectory | C:\vstsagents\agent01 |   |       | Agent.OS | Windows_NT |   |     | Agent.OSArchitecture | X64 |   |     | Agent.OSVersion | 10.0.14393 |   |     | ALLUSERSPROFILE | C:\ProgramData |   |     | AndroidSDK | C:\Program Files (x86)\Android\android-sdk |   |     | AndroidSDK_19 | C:\Program Files (x86)\Android\android-sdk\platforms\android-19 |   |     | AndroidSDK_21 | C:\Program Files (x86)\Android\android-sdk\platforms\android-21 |   |     | AndroidSDK_22 | C:\Program Files (x86)\Android\android-sdk\platforms\android-22 |   |     | AndroidSDK_23 | C:\Program Files (x86)\Android\android-sdk\platforms\android-23 |   |     | APPDATA | C:\Windows\system32\config\systemprofile\AppData\Roaming |   |     | AzureGuestAgent | C:\WindowsAzure\GuestAgent_2.7.41491.1008_2021-01-29_050642\GuestAgent\WindowsAzureGuestAgent.exe |   |     | AzurePS | 1.7.3 |   |     | ChocolateyInstall | C:\ProgramData\chocolatey |   |     | Cmd | C:\Windows\system32\cmd.exe |   |     | CommonProgramFiles | C:\Program Files\Common Files |   |     | CommonProgramFiles(x86) | C:\Program Files (x86)\Common Files |   |     | CommonProgramW6432 | C:\Program Files\Common Files |   |     | COMPUTERNAME | vm-vsts-w5vmej |   |     | ComSpec | C:\Windows\system32\cmd.exe |   |     | docker | C:\Program Files\Docker\docker.exe |   |     | DotNetFramework | C:\Windows\Microsoft.NET\Framework64\v4.0.30319 |   |     | DotNetFramework_2.0 | C:\Windows\Microsoft.NET\Framework\v2.0.50727 |   |     | DotNetFramework_2.0_x64 | C:\Windows\Microsoft.NET\Framework64\v2.0.50727 |   |     | DotNetFramework_3.0 | C:\Windows\Microsoft.NET\Framework\v3.0 |   |     | DotNetFramework_3.0_x64 | C:\Windows\Microsoft.NET\Framework64\v3.0 |   |     | DotNetFramework_3.5 | C:\Windows\Microsoft.NET\Framework\v3.5 |   |     | DotNetFramework_3.5_x64 | C:\Windows\Microsoft.NET\Framework64\v3.5 |   |  

ovelartelius commented 3 years ago

But are you using Azure DevOps Server or Services? Which task failed? And is it possible to send me the log for the task? (More than the rows in the init issue description) I did some testing today deploying different projects to DXP but could not get any errors. Have the task worked before or is this a new release pipeline that you are running the first time? If you have been able to run the task before, when was the last time it run without errors?

ovelartelius commented 3 years ago

@samwest88 I have now included the EpiCloud module in the tasks and released a new version v1.9.11. I have some small evidence that it should solve the problem but don´t know for sure. Can you please try run your pipeline again and see if it works?

samwest88 commented 3 years ago

@ovelartelius Thanks, I have checked on the store to see that the new version is present, looks like it is.

With regards to your question of when it was last working, looks like it last worked 20 July 2020 but not since then... hadn't deployed to this environment in quite a while it seems which I hadn't realized.

Still getting the same issue when re-running today. Not sure if any of the other information is potentially useful so have included it here:

2021-02-16T09:23:36.6838932Z ##[section]Starting: Deploy Integration to Preproduction 2021-02-16T09:23:36.6989591Z ============================================================================== 2021-02-16T09:23:36.6989954Z Task : Deploy To (Episerver DXP) 2021-02-16T09:23:36.6990609Z Description : Start move DXP deploy from source environment to target environment. Like clicking on the 'Deploy To' button in PAAS. (Episerver DXP, former DXC) 2021-02-16T09:23:36.6991032Z Version : 1.1.4 2021-02-16T09:23:36.6991423Z Author : Ove Lartelius 2021-02-16T09:23:36.6992159Z Help : https://github.com/Epinova/epinova-dxp-deployment/blob/master/documentation/DeployTo.md 2021-02-16T09:23:36.6992753Z ============================================================================== 2021-02-16T09:23:38.1062589Z Inputs: 2021-02-16T09:23:38.1073725Z ClientKey: ZF2FNikjqLTq2ipKCcJXP5mBjSSjgEyHVZNEUrohpFpaPxVj 2021-02-16T09:23:38.1086209Z ClientSecret: **** (it is a secret...) 2021-02-16T09:23:38.1100940Z ProjectId: 75edc87f-0841-4ee6-8e8f-a7a4018b322f 2021-02-16T09:23:38.1113793Z SourceEnvironment: Integration 2021-02-16T09:23:38.1124825Z TargetEnvironment: Preproduction 2021-02-16T09:23:38.1137676Z SourceApp: cms 2021-02-16T09:23:38.1149901Z UseMaintenancePage: True 2021-02-16T09:23:38.1161007Z Timeout: 2700 2021-02-16T09:23:38.1177632Z IncludeBlob: False 2021-02-16T09:23:38.1190469Z IncludeDb: False 2021-02-16T09:23:38.1474413Z @{Version=5.1.14393.3866} 2021-02-16T09:23:45.8248784Z ##[warning]Unable to resolve package source 'https://www.powershellgallery.com/api/v2'. 2021-02-16T09:23:45.9505803Z ##[error]No match was found for the specified search criteria and module name 'EpiCloud'. Try Get-PSRepository to see all available registered module repositories. 2021-02-16T09:23:46.0668036Z ##[error]The term 'Connect-EpiCloud' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 2021-02-16T09:23:46.1587888Z ##[section]Finishing: Deploy Integration to Preproduction

ovelartelius commented 3 years ago

I have a potential fix again. I dear not to deploy it during working hours. I will try to deploy this new version tonight and try it. I will let you know the outcome either way. But it sounds like your Agent is behind a firewall that don´t let your agent to get data from powershellgallery.com. Are you running on your own installed agent or using a Azure DevOps Server?

ovelartelius commented 3 years ago

@samwest88 v1.9.20 should be released now. I have run some tests and it works on Azure DevOps Services. So can you please try run your pipeline again and see if it works?

samwest88 commented 3 years ago

@ovelartelius OK your update that time has worked, thanks very much for your help. Closing.