How to set up SVN credentials in Jenkins?

88,803

Solution 1

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.

Solution 2

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.

Solution 3

We use svn+ssh for our authentication mechanism and in our case, you have to make sure your slave has ssh access that does not require manual password entry (i.e. use ssh-keygen to generate a key).

If you can ssh into the server simply by doing ssh username@server, then Jenkins should not have a problem performing commits.

Share:
88,803
Dima
Author by

Dima

Updated on October 19, 2020

Comments

  • Dima
    Dima over 3 years

    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

  • Sasha O
    Sasha O almost 13 years
    Also, if you click on the help question mark button next to the repo url, the explanation within has a link to reset credentials. Not very intuitive but works.
  • jpierson
    jpierson about 12 years
    I don't see any of these links in my case. Not sure what's wrong with my install it used to work before. All I see is "/trunk doesn't exist in the repository".
  • Kevin Brotcke
    Kevin Brotcke almost 11 years
    In case you are having trouble finding it, the URL is http://jenkins.mycompany.com/scm/SubversionSCM/enterCredenti‌​al.
  • Michael Hogenson
    Michael Hogenson about 10 years
    I know this is old but did you realize you blacked out the URL but it still appears in the error message? Gave me a laugh.
  • Barth
    Barth about 9 years
    But how will it help to commit ?