Getting Repository Error

Good day,

We began getting the following error during both VSTS Builds/Releases.  I've googled it and really haven't come up with a solution.  I've uninstalled our local DLMAutomation and reinstalled with the newest version, but still get the error.  Any help would be appreciated.
Here is the error:

##[warning]Could not find any suitable versions of DLMAutomation from any registered PSRepository

Thanks,
David
Tagged:

Best Answers

  • Mike UMike U Posts: 316 Gold 1
    Answer ✓
    Hi,

    That's a warning message, and it's safe to ignore it. It's telling you that it was unable to access the PowerShell Gallery to download the latest version of the DLM Automation module - probably because you're running on a private agent that only has PowerShell 3 (and therefore doesn't have the PowerShell Gallery cmdlets available). The code will fall back to using the installed version of DLM Automation, but you won't be able to get automatic updates to the latest version of DLM Automation.

    If you want auto updates to work, and to get rid of the warning message, you can either update the agent to a newer version of PowerShell using the WMF installer (see https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell?view=powershell-6 for details) or install the package management MSI for PowerShell 3/4.

    In the next release of the VSTS addons, we'll improve that warning message so it's clearer what's going on.


    Development Lead
    Redgate Software
  • Mike UMike U Posts: 316 Gold 1
    edited May 13, 2018 9:36PM Answer ✓
    Does your build agent actually have access to the internet, and specifically Powershell Gallery?

    The first step of doing the auto-update check is downloading PowerShellGet 1.6 if it's not already installed - and it's that part that's failing. We'll put some more error handling around it so that doesn't fail the build, but the auto-update mechanism will not work without that.

    If you run the following PowerShell on the agent, what's the output?
    Get-PSRepository<br>Get-Module PowerShellGet -ListAvailable<br>

    Development Lead
    Redgate Software

Answers

  • DavidWNAZDavidWNAZ Posts: 20 Bronze 1

    Hi Mike,

    I upgraded to Powershell 5.1 and am now getting the following error and the release actually fails.

    System.Exception: No match was found for the specified search criteria and module name 'PackageManagement'. Try Get-PSRepository to see all available registered module repositories.


    Any help is appreciated.


    Thanks,
    David

  • DavidWNAZDavidWNAZ Posts: 20 Bronze 1

    It was a proxy issue.  I was able to install the module once I included my credentials.  The Builds/Release now work again.

     

    When will DLM have the ability to circumvent proxies?

     

    Thanks for your help!

    David

Sign In or Register to comment.