2016-10-04 76 views
3

我正在嘗試創建一個Azure函數,該函數依賴於NuGet源代碼中的NuGet包。如何向Azure功能提供私人NuGet訂閱源憑據?

This question描述使用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). 

如何爲私營飼料憑據?

回答