简体   繁体   中英

Restore nuget package Jenkins

When I tried to use Jenkins as our CI environment to build ASP.NET MVC5 project, I set up to use MSBuild.exe to build project. But when the cmd run into restore nuget packages, it stucked. The error message is as below:

WARNING: Unable to connect to the remote server
Unable to find version '3.4.1.9004' of package 'Antlr'.
Build step 'Execute Windows batch command' marked build as failure

But if I use windows command line to run the msbuild, it is working and could download the pkg from nuget.org. Error only happened when try to build in Jenkins. And my network is fine, but behind a company proxy/firewall, I am not sure what it is. And I have set to auto restore nuget package in VS2013.

Any idea is much more appreciated.

I finally found out the root cause, it is the Jenkins service has not enough access right. Open windows services and right click on the Jenkins service, in the security tab, change the default user to whom that has enough access right to the Internet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM