How can we help you today? How can we help you today?

How do I tell SCA to not attempt to download from the powershell gallery?

I was demonstrating SCA today without an internet connection.  It showed the warnings below.  How can I tell SCA to skip DL and use the currently installed versions?

WARNING: Network connectivity may not be available, unable to reach remote
April 16th 2019 10:32:37
Info
sources.
April 16th 2019 10:32:37
Info
WARNING: Unable to bootstrap the required package provider due to problems with
April 16th 2019 10:32:37
Info
network connectivity. Please fix your network connection. If this is not
April 16th 2019 10:32:37
Info
possible, refer to 'Get-Help Install-PackageProvider' or
April 16th 2019 10:32:37
Info
http://go.microsoft.com/fwlink/?LinkId=626941 for guidance on installing the
April 16th 2019 10:32:37
Info
package provider manually.

...

WARNING: Unable to resolve package source
April 16th 2019 10:32:42
Info
April 16th 2019 10:32:42
Info
VERBOSE: Total package yield:'0' for the specified package
April 16th 2019 10:32:42
Info
'SqlChangeAutomation'.
April 16th 2019 10:32:42
Warning
Could not find any suitable versions of SqlChangeAutomation from any registered PSRepository
PeterDaniels
0

Comments

6 comments

  • Monday
    Is this error in one of the plugins like TFS or Jenkins? I know with TFS you can specify it to use a specific version or the latest version of the cmdlets. I would assume setting latest version will make it try and check for new versions.
    Monday
    0
  • Dan B
    Hi PeterDaniels,

    As requested if you still need assistance on this could you please elaborate on your setup and we can assist further.
    Dan B
    0
  • PeterDaniels
    Hi @Dan B.  Apologies for the delay in my reply.   This was using powershell cmdlets in a powershell script - not a CI plugin.  So, the question is how to turn off powershell gallery check in the individual cmdlets.
    PeterDaniels
    0
  • Dan B
    I believe the following page covers this https://documentation.red-gate.com/sca3/getting-started/installation/installing-powershell-components.

    Do you have either 

    1. Update-Module SqlChangeAutomation -AcceptLicense
    2. Install-Module SqlChangeAutomation -Scope CurrentUser -AcceptLicense

    In your build script?
    Dan B
    0
  • PeterDaniels
    No, but I do have
    Import-Module SQLChangeAutomation
    in the script.
    PeterDaniels
    0
  • Dan B
    Hi Peter,

    Apologies for the delay as I have been checking this with the team.

    At present, you can't change this behaviour within the tool. The best thing to do would be to use the team's uservoice page here https://redgate.uservoice.com/forums/267000-sql-change-automation to suggest this as an improvement.


    Dan B
    0

Add comment

Please sign in to leave a comment.