SVN+SSH Issue

394 views
Skip to first unread message

Jonathon Drysdale

unread,
Aug 15, 2011, 6:30:21 PM8/15/11
to Jenkins Users
Hi, we recently switched to using ssh with subversion on our project,
and now we’re having a problem with the Jenkins subversion plugin. I
am able to access our svn repository with svn+ssh using SmartSVN, but
when I enter the repository RUL into the Jenkins project
configuration, Jenkins does not see the path even after getting a
successful authentication.

I have Jenkins 1.425 and the latest subversion plugin on a Windows
Server 2008 OS.

I have verified the path is correct, the ID, the pass phrase, and the
key with SmartSVN.

I begin by entering the subversion repository path into our project
configuration with the svn+ssh://our_path/project. I then get the red
text error underneath, saying “Unable to access svn+ssh://our_path/
project” with the enter credentials option.

I click on the “enter credentials”, to get the Subversion
Authentication page. I enter our svn+ssh://our_path/project on the
repo URL, choose SSH public key, enter the user name, pass phrase, and
the path to the private key (.asc file). When I hit OK, I get a
successful authentication


But, when I hit close, tab off the Repo URL field, Jenkins doesn’t see
the repository. It still says “Unable to access svn+ssh://our_path/
project” with the same enter credentials option. Again, I have
verified the URL path is correct, the ID, the pass phrase, and the key
with SmartSVN.

Any suggestions, or feedback would be greatly appreciated

Didier Durand

unread,
Aug 16, 2011, 12:44:53 AM8/16/11
to Jenkins Users
Hi,

Did you check if the credentials that you give are stored or not in
the file $JENKINS_HOME hudson.scm.SubversionSCM.xml (password
"encoded" in base64) ?

Is the svn plugin properly activated and at its last version ?

PS: svn+ssh is supported. Check http://jenkins.361315.n4.nabble.com/SVN-SSH-checkout-on-jenkins-td3449403.html

regards

didier

Jonathon Drysdale

unread,
Aug 18, 2011, 6:38:20 PM8/18/11
to Jenkins Users
Latest plugin: yes
Latest Jenkins: yes
Credentials w/ encoded password in hudson.scm.Subersrion.xml: yes

At one point, we got it working when we used the svn+ssh://
username@server/our_path/project on the repo URL. Then it stopped
working - we got the ugly red text, saying "unable to access svn
+ssh..."

At another point we got it working when we used username:password@,
but then that suddenly stopped working also.

Does it matter where the private ssh key file is located? Does it have
to be on the same machine as Jenkins? Does it have to be in a certain
directory within Jenkins?

-Jonathon


On Aug 15, 11:44 pm, Didier Durand <durand.did...@gmail.com> wrote:
> Hi,
>
> Did you check if the credentials that you give are stored or not in
> the file $JENKINS_HOME hudson.scm.SubversionSCM.xml (password
> "encoded" in base64) ?
>
> Is the svn plugin properly activated and at its last version ?
>
> PS: svn+ssh is supported. Checkhttp://jenkins.361315.n4.nabble.com/SVN-SSH-checkout-on-jenkins-td344...
>
> regards
>
> didier
> > Any suggestions, or feedback would be greatly appreciated- Hide quoted text -
>
> - Show quoted text -

Chris

unread,
Aug 27, 2011, 1:36:22 PM8/27/11
to Jenkins Users
I am working on the same project as Jonathon and we're still having
problems.
I've been adding extra logging in various places in the subversion
plugin source,
but still can't quite figure out what's going on.

1) Start with a "clean" environment, i.e. no
hudson.scm.SubversionSCM.xml. Start Jenkins (1.427).

2) Create new free-style job and enter subversion repo URL, svn+ssh://
server/path/to/files.
Tab out of URL field and get the expected "Unable to access" red text.

3) Click Enter Credential link, select SSH public key authentication,
User Name=myusername, Pass phrase=mypassphrase, Private key=<path to
keyfile>
Click OK. Credential info is accepted. Save job.

hudson.scm.SubversionSCM.xml and jobs\myjobname\subversion.credentials
files get created with:

<credentials class="hashtable">
<entry>
<string>svn+ssh://server</string>
<hudson.scm.SubversionSCM_-DescriptorImpl_-SshPublicKeyCredential>
<userName>myusername</userName>
<passphrase>mypassphrase[encrypted]</passphrase>
<id>369ec6a06f620cc5</id>
</hudson.scm.SubversionSCM_-DescriptorImpl_-SshPublicKeyCredential>
</entry>
</credentials>

Message in log shows:
Aug 27, 2011 11:21:38 AM hudson.scm.SubversionSCM$DescriptorImpl$1
onSuccess
INFO: Persisted hudson.scm.SubversionSCM$DescriptorImpl
$SshPublicKeyCredential@13cb2c6 for svn+ssh://server

4) Go to job configuration page again, and I still see the red "Unable
to access" message.
In the messages below, should the createSVNAuthentication method be
trying to create a
SVNAuthentication of type=svn.username ? Shouldn't it be
type=svn.ssh ?

Messages in log (read from bottom up):

Aug 27, 2011 11:26:55 AM hudson.scm.SubversionSCM$DescriptorImpl
doCheckRevisionPropertiesSupported
INFO: Failed to access subversion repository svn+ssh://server/path/to/
files
org.tmatesoft.svn.core.SVNException: svn: No repository found in 'svn
+ssh://server/path/to/files'
at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:
64)
at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:
51)
at
org.tmatesoft.svn.core.internal.io.svn.SVNReader.handleFailureStatus(SVNReader.java:
269)
at
org.tmatesoft.svn.core.internal.io.svn.SVNReader.parse(SVNReader.java:
248)
at
org.tmatesoft.svn.core.internal.io.svn.SVNConnection.read(SVNConnection.java:
260)
at
org.tmatesoft.svn.core.internal.io.svn.SVNConnection.authenticate(SVNConnection.java:
160)
at
org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.authenticate(SVNRepositoryImpl.java:
1265)
at
org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:
1243)
at
org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.testConnection(SVNRepositoryImpl.java:
95)
at hudson.scm.SubversionSCM
$DescriptorImpl.checkRepositoryPath(SubversionSCM.java:2007)
...
---similar messages as block below---


Aug 27, 2011 11:26:54 AM hudson.scm.SubversionSCM$DescriptorImpl
doCheckRemote
INFO: Failed to access subversion repository svn+ssh://server/path/to/
files
org.tmatesoft.svn.core.SVNException: svn: No repository found in 'svn
+ssh://server/path/to/files'
at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:
64)
at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:
51)
at
org.tmatesoft.svn.core.internal.io.svn.SVNReader.handleFailureStatus(SVNReader.java:
269)
at
org.tmatesoft.svn.core.internal.io.svn.SVNReader.parse(SVNReader.java:
248)
at
org.tmatesoft.svn.core.internal.io.svn.SVNConnection.read(SVNConnection.java:
260)
at
org.tmatesoft.svn.core.internal.io.svn.SVNConnection.authenticate(SVNConnection.java:
160)
at
org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.authenticate(SVNRepositoryImpl.java:
1265)
at
org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:
1243)
at
org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.testConnection(SVNRepositoryImpl.java:
95)
at hudson.scm.SubversionSCM
$DescriptorImpl.checkRepositoryPath(SubversionSCM.java:2007)
at hudson.scm.SubversionSCM
$DescriptorImpl.doCheckRemote(SubversionSCM.java:1940)
.....

FINE: ****CHRIS****
[hudson.scm.SubversionSCM#requestClientAuthentication] auth is null
and ISVNAuthenticationManager.USERNAME=kind=svn.username
FINE: ****CHRIS****
[hudson.scm.SubversionSCM#requestClientAuthentication] auth is null
FINE: ****CHRIS****
[hudson.scm.SubversionSCM#requestClientAuthentication] url=svn+ssh://
server/path/to/files realm=svn+ssh://server kind=svn.username
global=hudson.scm.SubversionSCM$DescriptorImpl
$RemotableSVNAuthenticationProviderImpl@11ce012
FINE: ****CHRIS****
[hudson.scm.SubversionSCM#SshPublicKeyCredential#createSVNAuthentication]
If the type is not svn.ssh, then null will be returned.
FINE: ****CHRIS****
[hudson.scm.SubversionSCM#SshPublicKeyCredential#createSVNAuthentication]
Trying to create SVNAuthentication of type=svn.username
FINE:
global.hudson.scm.SubversionSCM#requestClientAuthentication(svn.username,svn
+ssh://server/path/to/files,svn+ssh://server)=>hudson.scm.SubversionSCM
$DescriptorImpl$SshPublicKeyCredential@13cb2c6
FINE: getCredential(svn+ssh://server)=>hudson.scm.SubversionSCM
$DescriptorImpl$SshPublicKeyCredential@13cb2c6
FINE: ****CHRIS****
[hudson.scm.SubversionSCM#requestClientAuthentication] auth is null
FINE: ****CHRIS****
[hudson.scm.SubversionSCM#requestClientAuthentication] url=svn+ssh://
server/path/to/files realm=svn+ssh://server kind=svn.username
local=hudson.scm.PerJobCredentialStore@9a5d54
FINE: ****CHRIS****
[hudson.scm.SubversionSCM#SshPublicKeyCredential#createSVNAuthentication]
If the type is not svn.ssh, then null will be returned.
FINE: ****CHRIS****
[hudson.scm.SubversionSCM#SshPublicKeyCredential#createSVNAuthentication]
Trying to create SVNAuthentication of type=svn.username
FINE:
local.hudson.scm.SubversionSCM#requestClientAuthentication(svn.username,svn
+ssh://server/path/to/files,svn+ssh://server)=>hudson.scm.SubversionSCM
$DescriptorImpl$SshPublicKeyCredential@1186cf9
FINE: ****CHRIS****
[hudson.scm.SubversionSCM#requestClientAuthentication] previousAuth is
null
FINE: ****CHRIS****
[hudson.scm.SubversionSCM#requestClientAuthentication].
authMayBeStored=true
FINE: ****CHRIS**** [hudson.scm.SubversionSCM#doCheckRemote] Going to
checkRepositoryPath, repoURL=svn+ssh://server/path/to/files
FINE: ****CHRIS**** [hudson.scm.SubversionSCM#doCheckRemote] value=svn
+ssh://server/path/to/files url=svn+ssh://server/path/to/files



Any ideas ?
Thanks,
-Chris


On Aug 18, 5:38 pm, Jonathon Drysdale <jadrysdal...@gmail.com> wrote:
> Latest plugin: yes
> Latest Jenkins: yes
> Credentials w/ encoded password in hudson.scm.Subersrion.xml: yes
>
> At one point, we got it working when we used thesvn+ssh://
> username@server/our_path/project on the repo URL. Then it stopped
> working - we got the ugly red text, saying "unable to accesssvn
> +ssh..."
>
> At another point we got it working when we used username:password@,
> but then that suddenly stopped working also.
>
> Does it matter where the privatesshkey file is located? Does it have
> to be on the same machine as Jenkins? Does it have to be in a certain
> directory within Jenkins?
>
> -Jonathon
>
> On Aug 15, 11:44 pm, Didier Durand <durand.did...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > Did you check if the credentials that you give are stored or not in
> > the file $JENKINS_HOME hudson.scm.SubversionSCM.xml (password
> > "encoded" in base64) ?
>
> > Is thesvnplugin properly activated and at its last version ?
>
> > PS:svn+sshis supported. Checkhttp://jenkins.361315.n4.nabble.com/SVN-SSH-checkout-on-jenkins-td344...
>
> > regards
>
> > didier
>
> > On Aug 16, 12:30 am,JonathonDrysdale <jadrysdal...@gmail.com> wrote:
>
> > > Hi, we recently switched to usingsshwith subversion on our project,
> > > and now we’re having a problem with the Jenkins subversion plugin. I
> > > am able to access oursvnrepository withsvn+sshusing SmartSVN, but
> > > when I enter the repository RUL into the Jenkins project
> > > configuration, Jenkins does not see the path even after getting a
> > > successful authentication.
>
> > > I have Jenkins 1.425 and the latest subversion plugin on a Windows
> > > Server 2008 OS.
>
> > > I have verified the path is correct, the ID, the pass phrase, and the
> > > key with SmartSVN.
>
> > > I begin by entering the subversion repository path into our project
> > > configuration with thesvn+ssh://our_path/project. I then get the red
> > > text error underneath, saying “Unable to accesssvn+ssh://our_path/
> > > project” with the enter credentials option.
>
> > > I click on the “enter credentials”, to get the Subversion
> > > Authentication page. I enter oursvn+ssh://our_path/project on the
> > > repo URL, chooseSSHpublic key, enter the user name, pass phrase, and
> > > the path to the private key (.asc file). When I hit OK, I get a
> > > successful authentication
>
> > > But, when I hit close, tab off the Repo URL field, Jenkins doesn’t see
> > > the repository. It still says “Unable to accesssvn+ssh://our_path/

Chris

unread,
Aug 28, 2011, 12:28:38 PM8/28/11
to Jenkins Users
As often happens when I take the time to fully document a problem, I'm
spurred into thinking along different lines,
It turns out that there were a couple of credential files in the C:
\Users\<user>\AppData\Roaming\Subversion\auth\svn.ssh subdirectory.
I'm not sure who put those files there (svnkit, some other svn
client ?), but the effect is that the information in one of those
files was taking precedence over the information typed into the
Jenkins job configuration and causing the authentication to the
subversion server to fail.

Does anybody know who put those files there, and if there is a way to
have Jenkins ignore "external" credentials ? ("external" as in outside
of the %JENKINS_HOME% subdirectory)

Thanks,
Chris

On Aug 27, 12:36 pm, Chris <chris7...@gmail.com> wrote:
> I am working on the same project as Jonathon and we're still having
> problems.
> I've been adding extra logging in various places in the subversion
> plugin source,
> but still can't quite figure out what's going on.
>
> 1) Start with a "clean" environment, i.e. no
> hudson.scm.SubversionSCM.xml. Start Jenkins (1.427).
>
> 2) Create new free-style job and enter subversion repo URL,svn+ssh://
> server/path/to/files.
> Tab out of URL field and get the expected "Unable to access" red text.
>
> 3) Click Enter Credential link, selectSSHpublic key authentication,
> User Name=myusername, Pass phrase=mypassphrase, Private key=<path to
> keyfile>
> Click OK. Credential info is accepted. Save job.
>
> hudson.scm.SubversionSCM.xml and jobs\myjobname\subversion.credentials
> files get created with:
>
> <credentials class="hashtable">
> <entry>
> <string>svn+ssh://server</string>
> <hudson.scm.SubversionSCM_-DescriptorImpl_-SshPublicKeyCredential>
> <userName>myusername</userName>
> <passphrase>mypassphrase[encrypted]</passphrase>
> <id>369ec6a06f620cc5</id>
> </hudson.scm.SubversionSCM_-DescriptorImpl_-SshPublicKeyCredential>
> </entry>
> </credentials>
>
> Message in log shows:
> Aug 27, 2011 11:21:38 AM hudson.scm.SubversionSCM$DescriptorImpl$1
> onSuccess
> INFO: Persisted hudson.scm.SubversionSCM$DescriptorImpl
> $SshPublicKeyCredential@13cb2c6 forsvn+ssh://server
>
> 4) Go to job configuration page again, and I still see the red "Unable
> to access" message.
> In the messages below, should the createSVNAuthentication method be
> trying to create a
> SVNAuthentication of type=svn.username ? Shouldn't it be
> type=svn.ssh?
>
> Messages in log (read from bottom up):
>
> Aug 27, 2011 11:26:55 AM hudson.scm.SubversionSCM$DescriptorImpl
> doCheckRevisionPropertiesSupported
> INFO: Failed to access subversion repositorysvn+ssh://server/path/to/
> INFO: Failed to access subversion repositorysvn+ssh://server/path/to/
> If the type is notsvn.ssh, then null will be returned.
> FINE: ****CHRIS****
> [hudson.scm.SubversionSCM#SshPublicKeyCredential#createSVNAuthentication]
> Trying to create SVNAuthentication of type=svn.username
> FINE:
> global.hudson.scm.SubversionSCM#requestClientAuthentication(svn.username,svn
> +ssh://server/path/to/files,svn+ssh://server)=>hudson.scm.SubversionSCM
> $DescriptorImpl$SshPublicKeyCredential@13cb2c6
> FINE: getCredential(svn+ssh://server)=>hudson.scm.SubversionSCM
> $DescriptorImpl$SshPublicKeyCredential@13cb2c6
> FINE: ****CHRIS****
> [hudson.scm.SubversionSCM#requestClientAuthentication] auth is null
> FINE: ****CHRIS****
> [hudson.scm.SubversionSCM#requestClientAuthentication] url=svn+ssh://
> server/path/to/files realm=svn+ssh://server kind=svn.username
> local=hudson.scm.PerJobCredentialStore@9a5d54
> FINE: ****CHRIS****
> [hudson.scm.SubversionSCM#SshPublicKeyCredential#createSVNAuthentication]
> If the type is notsvn.ssh, then null will be returned.
Reply all
Reply to author
Forward
0 new messages