2016-06-01 2 views
3

TeamCity가 동일한 TeamCity 인스턴스에서 실행되는 NuGet 서비스에 대한 권한을 부여 할 수 없다는 것이 문제입니다. 아래에서자체 HTTP 인증 NuGet 서비스를 사용하도록 TeamCity를 설정하는 방법은 무엇입니까?

는 빌드 구성은 이제 모양을 찾을 수 있습니다 Build Step

I NuGet 자격 증명도 추가 빌드 기능 :이 구성 NuGet Credentials

을 내가 로그에 다음과 같은 오류가 나타날 :

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 

다른 여러 구성을 시도했습니다. 예를 들어 % teamcity.nuget.feed.server % 및 % teamcity.nuget.feed.auth.server %를 사용했습니다. 또한 NuGet 자격 증명을 사용하여 빌드 기능을 제거하려고했습니다 (설명서에는 자체 호스팅 NuGet 서비스로 인증 할 필요가 없다고 말하기 때문에). 소스 http://nuget.org도 삭제하려고 시도했습니다. 아무것도 작동하지 않습니다.

답변

0

NuGet 3을 사용하고 있지만 패키지 소스가 v2 Feed를 가리키고 있다고 생각합니다.

업데이트하여 "NuGet.config"(C : \ WINDOWS \ system32를 \ 설정 \ systemprofile \의 AppData \ 로밍 \ NuGet \ NuGet.Config) 다음과 같은 패키지 소스와 :

<packageSources> 
    <add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" /> 
</packageSources> 
관련 문제