简体   繁体   中英

Jenkins & caching of SVN Credentials

Like a lot of people I am banging my head (again) against Jenkins and the subversion plugin. Authenication through the website (enter credentials) fails on authentication. Funny, since I can access svn with the same credentials.

I have deleted:

  • $HOME/.subversion
  • all entries in the hudson.scm.SubversionSCM.xml
  • the svn credentials in the job

What happend that it broke down? I reinstalled the jenkins.war in tomcat and ever since, Jenkins could not access svn anymore.

I've been down this road before and due to the trail-error situation never got to understand how this pain-in-the-arse setup works, to prevent this problem the next time.

These are the SVN problems I ran into when I moved a jenkins install to another machine.

  1. First, make sure svn commands work for the jenkins user in the console/terminal.

  2. Did you directly copy the config files from the previous install? In my case, the credentials in the config file were hashed and didn't work on a different machine. I deleted the previous config file and started from scratch. After I deleted my old config files, I set the credentials again in the webui.

  3. Are you running Jenkins as a service? Make sure the "Log on as" user for the jenkins service matches the credentials you're using.

Have you tried to access the svn host from command line on the jenkins server as the jenkins user? This might help to get svn to remember the credentials again.

When you put the URL you're checking out, Jenkins will put a link in where you can enter the credentials for checking out if it cannot access the URL.

You can log in as the Jenkins User , and then manually enter the credentials. I believe Jenkins will use them if available. However, Jenkins does not store its credentials there. They're stored somewhere in the $JENKINS_HOME directory in an XML file. The file name will have subversion in it, but it won't be the standard .subversion file.

I don't have access to my Jenkins server now to see the file name. I recommend that you create a special Jenkins user ID that has rather straight forward access to your Subversion repository rather than using a current user.

对我来说,我发现凭证位于〜/ .jenkins / jobs / ABCJob / subversion.credentials

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