While running my existing Jenkins Project I am running into the below issue as soon as I start it -
Click to view the error
I tried hitting the URL for Maven Meta Data (as in the screen shot) manually to check 401 issue but I am able to download the meta data file through browser. artifact.unx is an internal site. I have re-checked my access to the site as well and it works fine. Also, this has been a recent issue and Jenkins project executed just fine some days back.
Any lead here would be useful.
Most likely your repository requires authentication and something changed in the setup of it, a proxy or the machine running Jenkins jobs that make it no longer authorised.
Gradle supports multiple schemes of authentication for repositories. Have a look at the documentation.
Related
I am writing instructions on how to set up Travis CI to deploy to our local Nexus 3 maven repository. I am testing my own instructions to make sure everything works. I have discovered that I cannot upload any artifacts using maven unless I use administrator credentials. As a regular user, I can upload using the provided web UI, but not maven.
All the users have full admin rights over the hosted repositories as well as the nx-component-upload privilege which enables the UI upload.
I must be missing something. The error message I get when running maven deploy is:
org.apache.maven.shared.transfer.artifact.deploy.ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact nz.org.riskscape:rsum_api:jar:1.0 from/to juglab-release (https://dais-maven/repository/juglab-release/): Failed to transfer file https://dais-maven/repository/juglab-release/nz/org/riskscape/rsum_api/1.0/rsum_api-1.0.jar with status code 401
Thanx in advance for any help
I finally got it to work. The problem was in the settings file, the username had been misstyped.
I'm setting up TFS 2015 for my team to try out, and I'm having trouble getting it off the ground. It sounded straightforward, but things don't work and I can't find any diagnostics, and tutorials don't match what I'm seeing. Some highlights:
When I go to download a Build Agent from the server, I don't get a PowerShell file (ConfigureAgent.ps1), I get ConfigureAgent.cmd.
The images and description of setting up the build controller show me a nice picture of the TFS Admin Console with a Build Controller and Build Agent and their statuses underneath 'Build' (see Team Foundation Server 2015 Builds will not start or https://msdn.microsoft.com/en-us/library/ms181712.aspx.) On my system, I see this display under XAML Build Config (the old way,) but the Build item in the console doesn't have anything like that. It has a link to download an agent, but installing an agent doesn't change this.
Installing the agent appears to work. I get a service that's running, and the web portal agrees that I have an agent in the default queue and pool.
But, queuing a build just sits there. I've found the _diag folder for the agent, which has logs with a bunch of "Message received, no message retrieved" lines. I can't find anywhere else to check if the server knows about this build.
The service account is Network Service, and I've tried putting it in every TFS group mentioned online regarding permissions.
My setup is TFS and VS 2015 installed on our build machine, with it also hosting the build agent. I'm on port 8079, because port 8080 is taken. It's got to be something silly I missed, because everything looks like it's working. Has anyone gotten this beast off the ground without coming from a pre-existing install?
The configureagent.cmd is the correct file (it does pretty much what he ps script did)
Make sure the account that the agent is run under is in the "Agent Pool Service Account" role. It is better to use a domain/machine account not a local service account.
Make sure the queue is provisioned in the collection ( https://your-tfs-server:8080/tfs/your-collection/_admin/_AgentQueue ). If not - select "New queue.." and select the existing queue.
Make sure that when setting up the build through web access, the demands (on the general tab) is met by the capabilities of the agent.
If all this is in place, I have found that it facilitates testing by running the agent in interactive mode (not as a service). This gives you a bit better insight into what is happening. When it is working you can configure it as a service again.
Use an actual service account, not NETWORK SERVICE, and make sure that service account is a member of the Build Service Accounts group in your Team Project.
For me the issue was that the IIS's Team Foundation Server site setting's Authentication, "Windows Authentication" had to be enabled.
I was using a windows user as the log in credentials for the Build Agent running as a service.
Remember this new build system uses all http now.
It does not talk to any tfs build controller.
I have an Active Directory plugin installed that allows logging in to Jenkins portal with my directory credentials by typing them in on the Login page.
But is there a way to automatically log in users if they are on a domain-joined machine? (Obviously, given the browser is configured to allow providing credentials to the site.)
There's a thread on Jenkins Dev group in which a guy mentions that he developed an SSO plugin that worked for him on Windows. He posted it on GitHub under name NegotiateSSO.
First you need to build it to get the hpi file. (Clone the project to your machine, cd into the directory and run mvn (Maven) in it).
The problem is that when I tried to install it, it broke my Jenkins configuration section/page. There's an exception happening inside the plugin that breaks the entire page.
So it didn't work for me, but hopefully it will get fixed at some point and we'll be able to use it.
I have a question about updating GitHub plugin.
Everytime I do an update plugin such as GitHub and restart the jenkins, Jenkins start crashing. when I try to access jenkins through URL in my browser, the error page shows up with some exception "class not found jenkins/model jenkins" . and then in order to make jenkins working again , I have to delete the plugin entirely from the plugins directory. I wish someone has an answer for this because I really need to make my github projects available to jenkins for build. Thanks
It is a very usual problem with Jenkins. My workaround was to either update the jenkins (where ever it is installed) and restarting the hudson service.
sometimes even restarting the service works.
often you might need to remove those plugins from within (/var/lib/hudson/plugins/) and restart the service.
I'm developing a Grails 2.0.x application that of course has several external dependencies. Since I'm sitting behind a corporate firewall I've configurerd my ProxySettings.groovy to allow access to internet, which works as it should.
Now we also need to include dependencies to some local artifacts (from other projects), which can be found in our local Maven repository. Our corporate network setup is to use the proxy only for external sites, not internal ones. So when Grails resolve my dependencies at startup it downloads all the external artifacts fine, but fails when trying to fetch our local dependencies. If I completely remove the content of my ProxySettings.groovy-file, then the opposite is true, Grails can't resolve the external dependencies, but does manage to download the JARs from our local Maven repository.
I've tried to find documentation on how to exclude internal sites from using the proxy-settings in Grails, but failed miserably so far.
One other alternative could perhaps be to remove (or change) the proxy settings programmtically in BuildConfig.groovy before the call to mavenRepo?
Currently we are not using Maven to build our Grails projects (since we previously have had some issues with creating release builds on the build server).
Any help would be much appreciated!
Right now I do not thing there is an easy way to get around this.
There is currently an open bug for being able to switch the Proxy-Setting programmtically
http://jira.grails.org/browse/GRAILS-7658
Another option would be to move the internal dependencies inside your grails project.
or you could just dump everything in BuildConfig.groovy
System.properties.putAll([
"http.proxyHost": "myproxy.hostname.com",
"http.proxyPort": "8080",
"http.proxyUserName": "myUser",
"http.proxyPassword": "myPass"
])
clear it out for the internal dependencies and then you might be good.