.Net Core 必须在 NuGet.Config 文件中将“allowInsecureConnections”显式设置为 true。

问题

必须在 NuGet.Config 文件中将“allowInsecureConnections”显式设置为 true。

解决

1. 找到 NuGet.Config 文件,我的在 C:\Users\Rina\AppData\Roaming\NuGet 目录下

image.png

2. 修改 NuGet.Config 文件 ,添加如下信息

image.png
  • 完整文件如下
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="Nuget.Next" value="http://192.168.x1.1x4:9xxx/v3/index.json" allowInsecureConnections="true" />
  </packageSources>
</configuration>

3. 再次推送

dotnet nuget push  -k  69279xxe-c6f4-48ee-8d9d-72d38dab4b95 -s http://192.168.x1.1x4:9xxx/v3/index.json MiniWord.0.9.1.nupkg
image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容