Cannot create SVN authentication credentials

844 views
Skip to first unread message

psg

unread,
Apr 7, 2011, 7:38:13 AM4/7/11
to Jenkins Users
I am having real problems creating SVN authentication credentials. Our
repository allows anonymous read access but to create a tag the use
must be authenticated, thus we get an error when trying to create tags
from Jenkins (1.404 with SVN plugin 1.24)

After reading around I found the suggestion that you can use the URL
http://host:port/scm/SubversionSCM/enterCredential when I try this I
get the following error.

No authentication was attempted.
FAILED: org.tmatesoft.svn.core.SVNErrorMessage: svn: Operation
cancelled
org.tmatesoft.svn.core.SVNCancelException: svn: Operation cancelled
at hudson.scm.UserProvidedCredential
$AuthenticationManagerImpl.checkIfProtocolCompleted(UserProvidedCredential.java:
253)
at hudson.scm.SubversionSCM
$DescriptorImpl.postCredential(SubversionSCM.java:1732)
at hudson.scm.SubversionSCM
$DescriptorImpl.doPostCredential(SubversionSCM.java:1676)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:
282)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
at
org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:
88)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:103)
at
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:
53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:233)
at
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:
53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
at winstone.ServletConfiguration.execute(ServletConfiguration.java:
249)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
at hudson.util.PluginServletFilter
$1.doFilter(PluginServletFilter.java:94)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:
86)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at hudson.security.ChainedServletFilter
$1.doFilter(ChainedServletFilter.java:84)
at
hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:
76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at
hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:
81)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
at
winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:
244)
at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
at java.lang.Thread.run(Unknown Source)
Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: Operation
cancelled
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:
200)
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:
146)
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:
89)
at org.tmatesoft.svn.core.SVNCancelException.(SVNCancelException.java:
33)
... 43 more

This is a big blocker for us at the moment.

Any help much appreciated
Paul

psg

unread,
Apr 7, 2011, 8:27:00 AM4/7/11
to Jenkins Users
Now updated to Jenkins 1.405 and Subversion plugin 1.25 and still get
same exception :-(

On Apr 7, 12:38 pm, psg <ps.gr...@gmail.com> wrote:
> I am having real problems creating SVN authentication credentials. Our
> repository allows anonymous read access but to create a tag the use
> must be authenticated, thus we get an error when trying to create tags
> from Jenkins (1.404 with SVN plugin 1.24)
>
> After reading around I found the suggestion that you can use the URLhttp://host:port/scm/SubversionSCM/enterCredentialwhen I try this I

psg

unread,
Apr 7, 2011, 8:29:08 AM4/7/11
to Jenkins Users
No authentication was attempted.
FAILED: org.tmatesoft.svn.core.SVNErrorMessage: svn: Operation
cancelled
org.tmatesoft.svn.core.SVNCancelException: svn: Operation cancelled
at hudson.scm.UserProvidedCredential
$AuthenticationManagerImpl.checkIfProtocolCompleted(UserProvidedCredential.java:
253)
at hudson.scm.SubversionSCM
$DescriptorImpl.postCredential(SubversionSCM.java:1733)
at hudson.scm.SubversionSCM
$DescriptorImpl.doPostCredential(SubversionSCM.java:1677)

Frédéric Camblor

unread,
Apr 7, 2011, 8:37:56 AM4/7/11
to jenkins...@googlegroups.com
Hi Paul,

2 things :
- Have you looked into HUDSON_HOME/hudson.scm.SubversionSCM.xml ? Is there some entry for your svn repository inside it ? (there shouldn't be, but who knows...)
- Have you tried to use svn command line and try to login with it "manually" ? By this way, if you login successfully, can you try to log in with Jenkins some more time ? Is it then succcessul ?

Note : to clean your credentials after the tests, remove the ~/.subversion/auth/ directory (or on windows, it is in something like %app_data%/Subversion/auth/).

Frédéric

2011/4/7 psg <ps.g...@gmail.com>



--
Frédéric Camblor

psg

unread,
Apr 7, 2011, 9:00:12 AM4/7/11
to Jenkins Users
Frédéric

This is the contents of our HUDSON_HOME/hudson.scm.SubversionSCM.xml

<?xml version='1.0' encoding='UTF-8'?>
<hudson.scm.SubversionSCM_-DescriptorImpl>
<generation>16</generation>
<credentials class="hashtable"/>
<workspaceFormat>10</workspaceFormat>
<validateRemoteUpToVar>false</validateRemoteUpToVar>
</hudson.scm.SubversionSCM_-DescriptorImpl>

We do not have %app_data%/Subversion/auth/ directory as we have not
installed or used any SVN client on the server

Where is the SVN plugin supposed to store the auth credentials that
are added via the Jenkins UI?

Regards
Paul

On Apr 7, 1:37 pm, Frédéric Camblor <fcamb...@gmail.com> wrote:
> Hi Paul,
>
> 2 things :
> - Have you looked into HUDSON_HOME/hudson.scm.SubversionSCM.xml ? Is there
> some entry for your svn repository inside it ? (there shouldn't be, but who
> knows...)
> - Have you tried to use svn command line and try to login with it "manually"
> ? By this way, if you login successfully, can you try to log in with Jenkins
> some more time ? Is it then succcessul ?
>
> Note : to clean your credentials after the tests, remove the
> ~/.subversion/auth/ directory (or on windows, it is in something like
> %app_data%/Subversion/auth/).
>
> Frédéric
>
> 2011/4/7 psg <ps.gr...@gmail.com>

Frédéric Camblor

unread,
Apr 7, 2011, 10:09:02 AM4/7/11
to jenkins...@googlegroups.com
Ok so, there isn't any credential entry (if there were one, it would reside in the <credentials> hashtable).

Could you try installing svn client on your (windows ?) machine and try to "manually" svn checkout your repository somewhere ?
(it will prompt for your credentials and store them in %app_data%/Subversion/auth/ directory).

Let me know if svn checkout succeeds (or not).

Frédéric

2011/4/7 psg <ps.g...@gmail.com>



--
Frédéric Camblor

psg

unread,
Apr 7, 2011, 3:09:10 PM4/7/11
to Jenkins Users
Frédéric

I added an SVN client (svnkit) and then did an command that need
authentication the auth directory was then created. Tagging then
worked in Jenkins.

Surely this must be a bug in the SVN plugin?

Paul

Frédéric Camblor

unread,
Apr 7, 2011, 4:31:39 PM4/7/11
to jenkins...@googlegroups.com
Ok then.. several questions :
- How are you "tagging" ? Are you relying on maven release plugin ?
- Since auth directory is created, could you retry to go to http://host:port/scm/SubversionSCM/enterCredential and try to authenticate ?
If authentication works, go back to your HUDSON_HOME/hudson.scm.SubversionSCM.xml : are your credentials populated ? (with password encrypted).

Frédéric

2011/4/7 psg <ps.g...@gmail.com>



--
Frédéric Camblor

psg

unread,
Apr 8, 2011, 7:22:02 AM4/8/11
to Jenkins Users
We are using the new Artifactory plugin that tags the code before
deploying build artifacts to Artifactory. As I understand it this
plugin just reuses the underlying SVN plugin to perform tagging all we
specify in the plugin is the tag name and location.

I tried adding the credentials again and got the same error

No authentication was attempted.
FAILED: org.tmatesoft.svn.core.SVNErrorMessage: svn: Operation
cancelled
org.tmatesoft.svn.core.SVNCancelException: svn: Operation cancelled
at hudson.scm.UserProvidedCredential
$AuthenticationManagerImpl.checkIfProtocolCompleted(UserProvidedCredential.java:
253)

Cheers
Paul
On Apr 7, 9:31 pm, Frédéric Camblor <fcamb...@gmail.com> wrote:
> Ok then.. several questions :
> - How are you "tagging" ? Are you relying on maven release plugin ?
> - Since auth directory is created, could you retry to go tohttp://host:port/scm/SubversionSCM/enterCredential
> and try to authenticate ?
> If authentication works, go back to your
> HUDSON_HOME/hudson.scm.SubversionSCM.xml
> : are your credentials populated ? (with password encrypted).
>
> Frédéric
>
> 2011/4/7 psg <ps.gr...@gmail.com>

Frédéric Camblor

unread,
Apr 8, 2011, 8:07:55 AM4/8/11
to jenkins...@googlegroups.com
Ok then I can't be more helpful though :(

Maybe you should contact directly maintainer of the artifactory plugin to be sure he is relying on the subversion plugin implementation (and not svn.exe "manual" commands)
Maybe he should be migrate its dependency to a more recent version of the subversion plugin, too ?

Sorry for not being really helpful there :(

Frédéric

2011/4/8 psg <ps.g...@gmail.com>



--
Frédéric Camblor

psg

unread,
Apr 8, 2011, 9:02:48 AM4/8/11
to jenkins...@googlegroups.com
But the exception come when I try to add credentials via the SVN plugin not the Artifactory. Artifacory fails becuase SVN plugin had no credentials set.
Reply all
Reply to author
Forward
0 new messages