Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up SVN credentials in Jenkins?

Is there a way to set up credentials that will be used by Jenkins when it performs SVN commit? I could't find a way to do so.

If I run Jenkins server on my machine, which has SVN client installed and my credentials are cached, it seems to work fine, but if I try to run Jenkins server on another machine, then I get an error.
ERROR: Failed to tag org.tmatesoft.svn.core.SVNCancelException: svn: No credential to try. Authentication failed

like image 253
Dima Avatar asked Mar 14 '11 16:03

Dima


People also ask

How do I add credentials to Jenkins?

From the Jenkins home page (i.e. the Dashboard of the Jenkins classic UI), click Manage Jenkins > Manage Credentials. Under Stores scoped to Jenkins on the right, click on Jenkins. Under System, click the Global credentials (unrestricted) link to access this default domain. Click Add Credentials on the left.

How does Jenkins integrate with SVN?

Now create a Jenkins build job. Select New Item, give the build project a name such as svn-tomcat-demo, select Maven project, and click OK. Under source code management, select Subversion and enter your SVN repository URL and credential. Please download the sample code and check the code into your SVN server.


2 Answers

If you go to the job configuration window where Jenkins asks for the repositories; if you wait a second after you put in the repo it tries to connect, if its unable to connect it prompts you with red text under the repository location[shown below]; click the provided link you are able to provide a key and any other way you would like to authenticate. It will then try to connect if it's successful your build should connect fine. enter image description here

The url to setup authentication for the other machine would be here through jenkins if you can't get red prompt to come up.

like image 76
myusuf3 Avatar answered Oct 04 '22 08:10

myusuf3


If it still doesn't work there is a way for you to manually enter your credentials.

Next to the Repository URL text box click the question mark. In that box will be the following text: "click this link and specify different credential". Click on that link to open the Subversion Authentication page. On that page enter the root of the repository URL, enter the login and password to use and click OK.

like image 34
Sarel Botha Avatar answered Oct 04 '22 08:10

Sarel Botha