0

几周前,这个错误开始出现。

Set-PSRepository : The specified Uri 'http://*****' for parameter     
'SourceLocation' is an invalid Web Uri. 
Please ensure that it meets the Web Uri requirements.

我不知道如何解决这个没有卸载 Powershell 的问题。StackOverflow 上有一个可用的解决方法,但它很笨重,不会长期为我工作。

坦率地说,我宁愿只找到 PSRepositories 的存储位置,并在需要时手动编辑文件。

4

2 回答 2

1

这个其他问题的答案应该会有所帮助:Register-PSRepository 上的无效 Web Uri 错误

它涉及首先使用本地路径注册存储库,然后将其更新为指向 URL。

于 2017-03-31T13:51:00.557 回答
0

有同样的问题,对我来说,这是我自己的存储库中的过期证书。交换了证书,错误消失了。

于 2021-09-06T14:49:06.817 回答