如何使用PowerShell模块和NuGet存储库
如果您正在使用NuGet存储库,Artifactory为您提供了使用PowerShell模块的能力。以下是步骤和命令你需要执行这些交互:使用Artifactory:
1.注册在Artifactory中创建的Nuget存储库:
Register-PSRepository -Name "
< PS-REPOSITORY-NAME >将为PowerShell客户端创建的存储库名称是什么<存储库名>是Artifactory中NuGet存储库的名称。
2.发布PowerShell模块:
release - module -Path "
3.找到模块:
Find-Module -Repository
4.下载模块:
Save-Module -Repository
5.如果允许匿名访问(在Artifactory的总体安全配置)是禁用,你可以使用凭据国旗为身份验证添加用户的凭据。例如:
Find-Module -Repository Save-Module -Repository
在执行这些命令(带有凭据标志)之后,系统将提示您输入用户的密码。