2016-06-01 2 views
3

ein Problem besteht darin, dass TeamCity nicht in den NuGet-Dienst autorisieren kann, der auf derselben TeamCity-Instanz ausgeführt wird.Wie wird TeamCity eingerichtet, um eigenen HTTP-authentifizierten NuGet-Dienst zu verwenden?

Im folgenden finden Sie finden, wie die Build-Konfiguration sieht nun: Build Step

ich auch hinzugefügt Build-Funktion für NuGet Credentials: NuGet Credentials

Mit dieser Konfiguration ich folgende Fehler in Protokoll angezeigt:

Restoring NuGet package Nuget.Package.Name.0.1.0.41. 
Please provide credentials for: http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc 
UserName: GET http://www.nuget.org/Packages(Id='Nuget.Package.Name';,Version='0.1.0.41') 
NotFound http://www.nuget.org/Packages(Id='Nuget.Package.Name';,Version='0.1.0.41') 194ms 
GET http://www.nuget.org/FindPackagesById()?id='Nuget.Package.Name'; 
NotFound http://www.nuget.org/FindPackagesById()?id='Nuget.Package.Name'; 105ms 
WARNING: Unable to find version '0.1.0.41' of package 'Nuget.Package.Name'. 
C:\Windows\system32\config\systemprofile\AppData\Local\NuGet\Cache: Package 'Nuget.Package.Name.0.1.0.41' is not found on source 'C:\Windows\system32\config\systemprofile\AppData\Local\NuGet\Cache'. 
C:\Windows\system32\config\systemprofile\.nuget\packages\: Package 'Nuget.Package.Name.0.1.0.41' is not found on source 'C:\Windows\system32\config\systemprofile\.nuget\packages\'. 
http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc: Unable to load the service index for source http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc. 
Cannot prompt for input in non-interactive mode. 
http://nuget.org: The V2 feed at 'http://www.nuget.org/FindPackagesById()?id='Nuget.Package.Name'' returned an unexpected status code '404 Not Found'. 

Errors in packages.config projects 
Unable to find version '0.1.0.41' of package 'Nuget.Package.Name'. 
C:\Windows\system32\config\systemprofile\AppData\Local\NuGet\Cache: Package 'Nuget.Package.Name.0.1.0.41' is not found on source 'C:\Windows\system32\config\systemprofile\AppData\Local\NuGet\Cache'. 
C:\Windows\system32\config\systemprofile\.nuget\packages\: Package 'Nuget.Package.Name.0.1.0.41' is not found on source 'C:\Windows\system32\config\systemprofile\.nuget\packages\'. 
http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc: Unable to load the service index for source http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc. 
Cannot prompt for input in non-interactive mode. 
http://nuget.org: The V2 feed at 'http://www.nuget.org/FindPackagesById()?id='Nuget.Package.Name'' returned an unexpected status code '404 Not Found'. 

NuGet Config files used: 
C:\Windows\system32\config\systemprofile\AppData\Roaming\NuGet\NuGet.Config 

Feeds used: 
C:\Windows\system32\config\systemprofile\AppData\Local\NuGet\Cache 
C:\Windows\system32\config\systemprofile\.nuget\packages\ 
http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc 
http://nuget.org 

Ich habe verschiedene andere Konfigurationen versucht, zB% teamcity.nuget.feed.server% und sogar% teamcity.nuget.feed.auth.server%. Ich habe auch versucht, die Build-Funktion mit NuGet-Anmeldeinformationen zu entfernen (da die Dokumentation besagt, dass sie sich nicht mit dem selbst gehosteten NuGet-Dienst authentifizieren muss). Versucht, http://nuget.org Quelle zu entfernen. Nichts funktioniert.

Antwort

0

Ich denke, Ihr Problem ist, dass Sie NuGet 3 verwenden, aber die Paketquelle verweist auf den v2-Feed.

Aktualisieren Sie Ihre "NuGet.config" (C: \ Windows \ system32 \ config \ Systemprofile \ AppData \ Roaming \ NuGet \ NuGet.Config) mit folgenden Paketquellen:

<packageSources> 
    <add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" /> 
</packageSources> 
Verwandte Themen