Reputation: 12345
we had Jenkins setup and working perfectly. Then We upgraded the SVN module, and now it fails every other build with "revision check failed". So one build will checkout all the changes correctly, then fail with this spurious error, then the next build works.
We use externals pointing to sub directories of one repo. No actual "external" repos.
According to this bug report: https://issues.jenkins-ci.org/browse/JENKINS-21785 the solution is to create an additional "Additional Credentials" duplicating the global credentials which already work. The problem is that this needs a realm. And we don't know what the realm is. We use assembla.com.
The suggested method is to run this:
svn --no-auth-cache --config-dir invalid info proto://host:port/path/to/repo
which in our case is:
svn --no-auth-cache --config-dir invalid info https://subversion.assembla.com/svn/ourrepo/
This returns the following info:
Path: ourproject
URL: https://subversion.assembla.com/svn/ourrepo
Relative URL: ^/
Repository Root: https://subversion.assembla.com/svn/ourrepo
Repository UUID: 26850efa-2baa-4381-9140-fb0xxxxxxxxx
Revision: 1755
Node Kind: directory
Last Changed Author: me
Last Changed Rev: 1755
Last Changed Date: 2015-12-10 15:23:10 +0100 (Thu, 10 Dec 2015)
No realm info.
Now interestingly, if you try to do a checkout, and put in the wrong password, the message you get back is:
Authentication realm: <https://subversion.assembla.com:443> Assembla Restricted
Now we assume that the string " Assembla Restricted" cant be the realm, as its contains spaces. The trouble is, we don't know what we are looking for. Is it a string? Is it a URL? We tried:
<https://subversion.assembla.com:443> Assembla Restricted
and
Assembla Restricted
and
"https://subversion.assembla.com:443"
as the realm, but these did not work
Upvotes: 9
Views: 11442
Reputation: 121
Try from commandline
svn auth
output:
Credential kind: svn.simple Authentication realm: `` VisualSVN Server Password cache: wincrypt Password: [not shown]`enter code here` Username: don
Upvotes: 0
Reputation: 123
I was facing the same problem. Through the discussions here I realized that the Authentication realm is a string of the form <http://path_to_svn_rep:port> Realm Name
that needs to be set in Jenkins. The struggle was to find what the Realm Name was. The commands posted here to get the realm did not work for me. This is what eventually did work:
1) Search for %appdata% folder on your Windows search (usually in C:\Users\username\appdata).
2) You'll find the Subversion folder. If you don't, try accessing your repository through the web browser. This will prompt you to enter your svn credentials. After you do, you'll find the subversion folder is created in the Appdata folder.
3) Browse through the contents of /Appdata/Subversion/auth. In one of the subfolders, you'll find the file which contains some text including your SVN realm. For SlikSVN, this was /Appdata/Subversion/auth/svn.simple/someRandomName.file. Copy the WHOLE line (e.g. https://myserver:443 realmname Subversion Repository).
4) Paste it in the additional credentials section under SVN inside the Jenkins job configure page.
Hope this helps!
Upvotes: 8
Reputation: 7125
We are having the same issue here and after some searching I found the following:
We are using visual svn server (windows implementation of svn server). When we use the command specified by jenkins, we also didn't get that realm info. So after logging in with rdp on the visual svn server, I checked the C:\Program Files (x86)\VisualSVN Server\conf\httpd.conf
There I found the following setting:
AuthName "VisualSVN Server"
So when I transformed the format
<proto://server:port> SvnRealmName
into this:
<https://pathtomyserver.com:443> VisualSVN Server
it started working, hopefully it will help someone else ;)
Upvotes: 1
Reputation: 1
I had the same issue when set up a SCM poll. Jenkins was able to poll for modification the direct repo url but not the externals. The solution was to add additional credentials for a realm.
I found this tip to understand what to put in realm field. With browser go on your repository and whatch the dialog to ask for your credentials. Usually in this dialog there should be something like https://yourrepo.yourcompany.com Subversion repository
So in realm you must use https://yourrepo.yourcompany.com Subversion repository
Don't forget the < >
Upvotes: 0
Reputation: 12345
The answer is as follows. When you run any svn command, you get back something like this:
Authentication realm: <https://subversion.assembla.com:443> Assembla Restricted
The ream is not "Assembla Restricted", nor is it the whole string, as many examples show, it is just the first part, in the case of assembla it is this:
<https://subversion.assembla.com:443>
Including the angle brackets.
For Assembla at least, it is the same as the repository URL, but with brackets around it and minus the path.
Upvotes: 1