Skip to content

Instantly share code, notes, and snippets.

@JMGEHMAN
Created June 7, 2018 18:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save JMGEHMAN/f57cc850147078a4c4e06ed4957c27cc to your computer and use it in GitHub Desktop.
Connect to Artifactory NuGet Repo
#vnuget = Name of the (v)irtual nuget repo I'm tring to connect to
# The virtual nuget repo combines a PowerShellGallery.com mirror
# with other local nuget repos used to hold internally-created modules
$repoParams=@{
Name = 'Artifactory'
SourceLocation = '<Artifactory URL>/api/nuget/vnuget'
InstallationPolicy = 'Trusted'
PublishLocation = '<Artifactory URL>/api/nuget/vnuget'
PackageManagementProvider = 'NuGet'
Verbose = $True
}
Register-PSRepository @repoParams
VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2/'; IsTrusted = 'False'; IsRegistered = 'True'.
VERBOSE: Performing the operation "Register Module Repository" on target "Module Repository 'Artifactory' (<Artifactory URL>/api/nuget/vnuget) in provider 'PSModule'".
VERBOSE: The specified PackageManagement provider name 'NuGet'.
WARNING: Repository location '<Artifactory URL>/api/nuget/vnuget' is not valid for this provider.
WARNING: Unable to resolve module repository '<Artifactory URL>/api/nuget/vnuget'.
VERBOSE: Successfully registered the repository 'Artifactory' with source location '<Artifactory URL>/api/nuget/vnuget'.
VERBOSE: Repository details, Name = 'Artifactory', Location = '<Artifactory URL>/api/nuget/vnuget'; IsTrusted = 'True'; IsRegistered = 'True'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment