2017-04-03 115 views
0

我正在運行TeamCity 10.0.5,並且作爲持續集成構建的一部分,我想將幾​​個Dll封裝在一起並將它們發佈到由Visual託管的NuGet源Studio在線...持續集成 - 從TeamCity部署NuGet到Visual Studio在線源

發佈步驟是當前沒有與飼料的NuGet進行身份驗證,從生成日誌這種提取物爲證......

 
Step 4/7: Publish BL, DAL and Entities nuget (NuGet Publish) (4s) 
[13:31:30][Step 4/7] push: Publish package OutputPackages\KeyedIn.Project.BLandDAL.1.0.0.nupkg (4s) 
[13:31:30][push] NuGet command: C:\TeamCity\buildAgent\plugins\nuget-agent\bin\JetBrains.TeamCity.NuGetRunner.exe C:\TeamCity\buildAgent\tools\NuGet.CommandLine.4.0.0\tools\NuGet.exe push C:\TeamCity\buildAgent\work\dc03049e2a33b930\OutputPackages\KeyedIn.Project.BLandDAL.1.0.0.nupkg %%teamcity_nuget_api_key_1491222690775%% -Source https://keyedincleckheaton.pkgs.visualstudio.com/_packaging/NuGet_Feed/nuget/v3/index.json 
[13:31:30][push] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script1071157934831391257.cmd 
[13:31:30][push] in directory: C:\TeamCity\buildAgent\work\dc03049e2a33b930\OutputPackages 
[13:31:31][push] JetBrains TeamCity NuGet Runner 8.0.42677.9 
[13:31:31][push] Registered additional extensions from paths: C:\TeamCity\buildAgent\plugins\nuget-agent\bin\plugins-2.0 
[13:31:31][push] Starting NuGet.exe 4.0.0.2283 from C:\TeamCity\buildAgent\tools\NuGet.CommandLine.4.0.0\tools\NuGet.exe 
[13:31:32][push] WARNING: Failed to load C:\TeamCity\buildAgent\plugins\nuget-agent\bin\plugins-2.0\JetBrains.TeamCity.NuGet.ExtendedCommands.2.0.dll 
[13:31:32][push] Could not load type 'NuGet.Commands.Command' from assembly 'NuGet, Version=4.0.0.2283, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. 
[13:31:32][push] 
[13:31:34][push] Please provide credentials for: https://keyedincleckheaton.pkgs.visualstudio.com/_packaging/NuGet_Feed/nuget/v3/index.json 
[13:31:34][push] Unable to load the service index for source https://keyedincleckheaton.pkgs.visualstudio.com/_packaging/NuGet_Feed/nuget/v3/index.json. 
[13:31:34][push] Response status code does not indicate success: 401 (Unauthorized). 
[13:31:34][push] UserName: 
[13:31:34][push] Process exited with code 1 
[13:31:34][Step 4/7] Step Publish BL, DAL and Entities nuget (NuGet Publish) failed 

我想確定我做了什麼錯誤 - 日誌表明沒有提供用戶名,但我看不到屏幕上的任何地方輸入一個:

enter image description here

看網上好像認證的問題是共同的 - 任何人都可以提供任何指導?

感謝

回答

3

您需要添加相應的VSTS用用戶名和密碼的NuGet源文件飼料。

  1. 創建個人訪問令牌
  2. 添加飼料源(nuget.exe sources add -name {your feed name} -source {your feed URL} -username {anything} -password {your PAT}
  3. 運行建立在TeamCity的

之後,您就可以在%APPDATA%\的NuGet相關供稿源\ NuGet.config文件。

注意:API密鑰可以是任何您想要的非空字符串,例如key,vsts。

+0

感謝你們......我已經度過了一個有趣的一天 - 您的評論幫助很大,並意識到構建代理正在本地系統帳戶上運行......歡呼尋求幫助。 –

0

使用VSTS NuGet feed進行身份驗證也可以通過添加NuGet Feed Credentials構建功能並僅在NuGet步驟中添加軟件包源來完成。也可以使用PAT作爲此構建功能。

相關問題