运行以下设置:代理问题与安装模块
- 服务器2012 R2
- PSVersion:4.0
- WSManStackVersion:3.0
- Git版本2.11.1
- 软件包管理预览 - 64 :10.0.10586.117
- SharpZipLib:0.86.0
- NuGet:2.8.5.2 08
要安装的豪华-git的模块为:
PowerShellGet\Install-Module posh-git -Scope CurrentUser
但要
PackageManagement \安装,包装:未找到匹配 指定的搜索条件和模块名字'posh-git'。
当试图Get-PackageSource
和Get-PSRepository
我得到
警告:无法找到包源
和
警告:无法找到模块的存储。
我坐在一个TMG代理后面,试着用-Proxy
开关和设置winttp代理没有运气。每基思·希尔的建议
尝试手动添加PowerShellGallery回购'重新设置gister-PSRepository -Name PSGallery -SourceLocation https://www.powershellgallery.com/api/v2/ -Proxy ... -ProxyCredential(Get-Credential)'。如果可行,请确保'Get-PSRepository'返回新注册的仓库。 –
感谢Keith,最终这样做了。 我已经在机器的代理中发现了异常,并注意到PowerShell 5.1在这方面似乎更容易配置。 – J1raya