我正在尝试创建一个依赖于私有NuGet feed中托管的NuGet包的Azure函数。
这个问题描述了如何使用上传到托管函数的应用程序服务的
我的函数按照预期使用这个配置文件,但它没有所需的凭据。Azure函数门户显示如下内容:
如何为私有源提供凭据?
nuget.config
文件 - 我的nuget.config
。<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="MyPrivateFeed" value="https://<url to feed>" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>
我的函数按照预期使用这个配置文件,但它没有所需的凭据。Azure函数门户显示如下内容:
2016-10-04T09:00:55.442 Starting NuGet restore
2016-10-04T09:00:56.926 Restoring packages for D:\home\site\wwwroot\HttpTriggerSqlDb\project.json...
2016-10-04T09:00:58.267 Please provide credentials for: https://<url to feed>
2016-10-04T09:00:58.515 Unable to load the service index for source https://<url to feed>.
2016-10-04T09:00:58.515 Response status code does not indicate success: 401 (Unauthorized).
如何为私有源提供凭据?
MyPrivateFeed
。 - brettsam