Quantcast

SCM credentials for SCM Stast plugin

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SCM credentials for SCM Stast plugin

drautureau
Hi all,

thanks Patroklos for introducing this new plugin!
I wanted to set it up on the projects we are developing in my enterprise but for that I absolutely need to use a username and password (I don't have the hand on the server to enable anonymous access).
Also, I don't want to add this username in my POMs because I don't want to make it appear in the maven generated site.
I was wondering if it would be possible to override SCM credential as it is in the SCM activity plugin.
What do you think of adding an option to use the credentials which are defined in the SCM activity pugin (seems pretty much coherent with http://jira.codehaus.org/browse/SONARPLUGINS-2239).

thanks

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SCM credentials for SCM Stast plugin

Patroklos Papapetrou
Hi 

Thanks a lot for your feedback. 
The issue you're describing is very reasonable so I created a jira ticket for that to include in next release http://jira.codehaus.org/browse/SONARPLUGINS-2239
Kind Regards
Patroklos

2012/10/9 <[hidden email]>
Hi all,

thanks Patroklos for introducing this new plugin!
I wanted to set it up on the projects we are developing in my enterprise but for that I absolutely need to use a username and password (I don't have the hand on the server to enable anonymous access).
Also, I don't want to add this username in my POMs because I don't want to make it appear in the maven generated site.
I was wondering if it would be possible to override SCM credential as it is in the SCM activity plugin.
What do you think of adding an option to use the credentials which are defined in the SCM activity pugin (seems pretty much coherent with http://jira.codehaus.org/browse/SONARPLUGINS-2239).

thanks

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SCM credentials for SCM Stast plugin

drautureau
Hi,
I just updated the plugin on my environment and validate the issue http://jira.codehaus.org/browse/SONARPLUGINS-2324.
Unfortunately, it seems that the properties sonar.scm.user.secured and sonar.scm.password.secured are not retrieved from SCMActivity configuration:
  [INFO] [11:20:29.166] Sensor org.sonar.plugins.buildstability.BuildStabilitySensor@421e0e35 done: 873 ms
  [INFO] [11:20:29.166] Sensor ScmActivitySensor...
  [INFO] [11:20:29.166] Trying to guess scm provider from project layout...
  [INFO] [11:20:29.166] Found SCM type: svn
  [INFO] [11:20:29.166] Retrieve SCM blame information...
  [INFO] [11:20:29.167] Retrieve SCM blame information done: 1 ms
  [INFO] [11:20:29.167] Sensor ScmActivitySensor done: 1 ms
  ...
  [INFO] [11:20:29.167] Sensor org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee...
  [INFO] [11:20:29.167] Collection SCM Change log for the last 0 days
  [INFO] [11:20:29.167] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn --non-interactive --trust-server-cert log -v http://localhost/darwin/moduleA/trunk
  [INFO] [11:20:29.167] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn --non-interactive --trust-server-cert log -v http://localhost/darwin/moduleA/trunk
  [INFO] [11:20:29.167] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn --non-interactive --trust-server-cert log -v http://localhost/darwin/moduleA/trunk
  [INFO] [11:20:29.167] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn --non-interactive --trust-server-cert log -v http://localhost/darwin/moduleA/trunk
  [INFO] [11:20:29.167] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
  [INFO] [11:20:29.167] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
  [INFO] [11:20:29.167] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
  [INFO] [11:20:29.167] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
  [WARN] [11:20:29.196] Fail to retrieve SCM info. Reason: The svn command failed.
svn: E170001: Unable to connect to a repository at URL 'http://localhost/darwin/moduleA/trunk'
svn: E170001: OPTIONS of 'http://localhost/darwin/moduleA/trunk': authorization failed: Could not authenticate to server: rejected Basic challenge (http://localhost)

  [INFO] [11:20:29.196] Sensor org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee done: 29 ms

Did I missed something?

thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SCM credentials for SCM Stast plugin

Patroklos Papapetrou
Hi 

It seems that you're facing a similar problem as described in this post :
Could you please tell me how do you trigger the analysis and how do you pass the parameters ( project settings, global settings or  command line ) 


2013/3/7 drautureau <[hidden email]>
Hi,
I just updated the plugin on my environment and validate the issue
http://jira.codehaus.org/browse/SONARPLUGINS-2324.
Unfortunately, it seems that the properties sonar.scm.user.secured and
sonar.scm.password.secured are not retrieved from SCMActivity configuration:
  [INFO] [11:20:29.166] Sensor
org.sonar.plugins.buildstability.BuildStabilitySensor@421e0e35 done: 873 ms
  [INFO] [11:20:29.166] Sensor ScmActivitySensor...
  [INFO] [11:20:29.166] Trying to guess scm provider from project layout...
  [INFO] [11:20:29.166] Found SCM type: svn
  [INFO] [11:20:29.166] Retrieve SCM blame information...
  [INFO] [11:20:29.167] Retrieve SCM blame information done: 1 ms
  [INFO] [11:20:29.167] Sensor ScmActivitySensor done: 1 ms
  ...
  [INFO] [11:20:29.167] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee...
  [INFO] [11:20:29.167] Collection SCM Change log for the last 0 days
  [INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
  [INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
  [INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
  [INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
  [INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
  [INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
  [INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
  [INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
  [WARN] [11:20:29.196] Fail to retrieve SCM info. Reason: The svn command
failed.
svn: E170001: Unable to connect to a repository at URL
'http://localhost/darwin/moduleA/trunk'
svn: E170001: OPTIONS of 'http://localhost/darwin/moduleA/trunk':
authorization failed: Could not authenticate to server: rejected Basic
challenge (http://localhost)

  [INFO] [11:20:29.196] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee done: 29 ms

Did I missed something?

thanks



--
View this message in context: http://sonar.15.n6.nabble.com/SCM-credentials-for-SCM-Stast-plugin-tp5003882p5009615.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SCM credentials for SCM Stast plugin

drautureau
Hi

you are right: I'm facing the same issue.
I'm running sonar with the Jenkins (1.504) and its plugin (2.0.1) and this project is a maven (3.0.5) project.
The SVN URL is available in the POM:
        <scm>
                <connection>scm:svn:http://localhost/darwin/moduleA/trunk</connection>
                <developerConnection>scm:svn:http://localhost/darwin/moduleA/trunk</developerConnection>
                <url>http://localhost/darwin/moduleA/trunk</url>
        </scm>
The SCM activity properties are set as following:
        sonar.scm.enabled=true
        sonar.scm.password.secured=<same as Jenkins>
        sonar.scm.threadCount=4
        sonar.scm.user.secured=<same as Jenkins>
And the log in debug mode:
        [INFO] [12:06:28.470] Sensor ScmActivitySensor...
        [INFO] [12:06:28.470] Trying to guess scm provider from project layout...
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.svn
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.git
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.hg
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.bzr
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/.svn
        [INFO] [12:06:28.470] Found SCM type: svn
        [INFO] [12:06:28.470] Retrieve SCM blame information...
        [DEBUG] [12:06:28.494] File changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppITCase.java
        [DEBUG] [12:06:28.496] File changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java
        [DEBUG] [12:06:28.495] File not changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/main/java/com/axway/moduleA/module2/App.java
        [INFO] [12:06:28.496] Retrieve SCM info for /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppITCase.java
        [INFO] [12:06:28.497] Retrieve SCM info for /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java
        [INFO] [12:06:28.548] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2 && svn --non-interactive --trust-server-cert blame --xml AppTest.java
        [INFO] [12:06:28.548] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2
        [INFO] [12:06:28.549] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2 && svn --non-interactive --trust-server-cert blame --xml AppITCase.java
        [INFO] [12:06:28.549] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2
        [WARN] [12:06:28.593] Fail to retrieve SCM info of: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java. Reason: The svn command failed.
        svn: E170001: Unable to connect to a repository at URL 'http://localhost/darwin/moduleA/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java'
        svn: E170001: OPTIONS of 'http://localhost/darwin/moduleA/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java': authorization failed: Could not authenticate to server: rejected Basic challenge (http://localhost)

I will investigate what the SVN blame command is supposed to do.

thanks for your help

----- Mail original -----
De: "Patroklos Papapetrou" <[hidden email]>
À: [hidden email]
Envoyé: Jeudi 7 Mars 2013 20:07:50
Objet: Re: [sonar-user] Re: SCM credentials for SCM Stast plugin

Hi


It seems that you're facing a similar problem as described in this post :
http://sonar.15.n6.nabble.com/svn-Could-not-authenticate-to-server-td5008536.html 
Could you please tell me how do you trigger the analysis and how do you pass the parameters ( project settings, global settings or command line )



Regards

Patroklos Papapetrou

Co-Author of Sonar in Action

http://gr.linkedin.com/in/ppapapetrou 

http://twitter.com/ppapapetrou76 


2013/3/7 drautureau < [hidden email] >


Hi,
I just updated the plugin on my environment and validate the issue
http://jira.codehaus.org/browse/SONARPLUGINS-2324 .
Unfortunately, it seems that the properties sonar.scm.user.secured and
sonar.scm.password.secured are not retrieved from SCMActivity configuration:
[INFO] [11:20:29.166] Sensor
org.sonar.plugins.buildstability.BuildStabilitySensor@421e0e35 done: 873 ms
[INFO] [11:20:29.166] Sensor ScmActivitySensor...
[INFO] [11:20:29.166] Trying to guess scm provider from project layout...
[INFO] [11:20:29.166] Found SCM type: svn
[INFO] [11:20:29.166] Retrieve SCM blame information...
[INFO] [11:20:29.167] Retrieve SCM blame information done: 1 ms
[INFO] [11:20:29.167] Sensor ScmActivitySensor done: 1 ms
...
[INFO] [11:20:29.167] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee...
[INFO] [11:20:29.167] Collection SCM Change log for the last 0 days
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk 
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk 
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk 
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk 
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[WARN] [11:20:29.196] Fail to retrieve SCM info. Reason: The svn command
failed.
svn: E170001: Unable to connect to a repository at URL
' http://localhost/darwin/moduleA/trunk '
svn: E170001: OPTIONS of ' http://localhost/darwin/moduleA/trunk ':
authorization failed: Could not authenticate to server: rejected Basic
challenge ( http://localhost )

[INFO] [11:20:29.196] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee done: 29 ms

Did I missed something?

thanks



--
View this message in context: http://sonar.15.n6.nabble.com/SCM-credentials-for-SCM-Stast-plugin-tp5003882p5009615.html 
Sent from the Sonar user mailing list archive at Nabble.com.



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email 



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SCM credentials for SCM Stast plugin

Patroklos Papapetrou
I'm looking also at the plugin's code to see if something's wrong with reading the properties of the SCM Activity plugin.
Seems that there's problem as well, but I can't tell you right now if it's the root of your issues...
I'll let you know


2013/3/8 <[hidden email]>
Hi

you are right: I'm facing the same issue.
I'm running sonar with the Jenkins (1.504) and its plugin (2.0.1) and this project is a maven (3.0.5) project.
The SVN URL is available in the POM:
        <scm>
                <connection>scm:svn:http://localhost/darwin/moduleA/trunk</connection>
                <developerConnection>scm:svn:http://localhost/darwin/moduleA/trunk</developerConnection>
                <url>http://localhost/darwin/moduleA/trunk</url>
        </scm>
The SCM activity properties are set as following:
        sonar.scm.enabled=true
        sonar.scm.password.secured=<same as Jenkins>
        sonar.scm.threadCount=4
        sonar.scm.user.secured=<same as Jenkins>
And the log in debug mode:
        [INFO] [12:06:28.470] Sensor ScmActivitySensor...
        [INFO] [12:06:28.470] Trying to guess scm provider from project layout...
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.svn
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.git
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.hg
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.bzr
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/.svn
        [INFO] [12:06:28.470] Found SCM type: svn
        [INFO] [12:06:28.470] Retrieve SCM blame information...
        [DEBUG] [12:06:28.494] File changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppITCase.java
        [DEBUG] [12:06:28.496] File changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java
        [DEBUG] [12:06:28.495] File not changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/main/java/com/axway/moduleA/module2/App.java
        [INFO] [12:06:28.496] Retrieve SCM info for /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppITCase.java
        [INFO] [12:06:28.497] Retrieve SCM info for /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java
        [INFO] [12:06:28.548] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2 && svn --non-interactive --trust-server-cert blame --xml AppTest.java
        [INFO] [12:06:28.548] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2
        [INFO] [12:06:28.549] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2 && svn --non-interactive --trust-server-cert blame --xml AppITCase.java
        [INFO] [12:06:28.549] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2
        [WARN] [12:06:28.593] Fail to retrieve SCM info of: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java. Reason: The svn command failed.
        svn: E170001: Unable to connect to a repository at URL 'http://localhost/darwin/moduleA/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java'
        svn: E170001: OPTIONS of 'http://localhost/darwin/moduleA/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java': authorization failed: Could not authenticate to server: rejected Basic challenge (http://localhost)

I will investigate what the SVN blame command is supposed to do.

thanks for your help

----- Mail original -----
De: "Patroklos Papapetrou" <[hidden email]>
À: [hidden email]
Envoyé: Jeudi 7 Mars 2013 20:07:50
Objet: Re: [sonar-user] Re: SCM credentials for SCM Stast plugin

Hi


It seems that you're facing a similar problem as described in this post :
http://sonar.15.n6.nabble.com/svn-Could-not-authenticate-to-server-td5008536.html
Could you please tell me how do you trigger the analysis and how do you pass the parameters ( project settings, global settings or command line )



Regards

Patroklos Papapetrou

Co-Author of Sonar in Action

http://gr.linkedin.com/in/ppapapetrou

http://twitter.com/ppapapetrou76


2013/3/7 drautureau < [hidden email] >


Hi,
I just updated the plugin on my environment and validate the issue
http://jira.codehaus.org/browse/SONARPLUGINS-2324 .
Unfortunately, it seems that the properties sonar.scm.user.secured and
sonar.scm.password.secured are not retrieved from SCMActivity configuration:
[INFO] [11:20:29.166] Sensor
org.sonar.plugins.buildstability.BuildStabilitySensor@421e0e35 done: 873 ms
[INFO] [11:20:29.166] Sensor ScmActivitySensor...
[INFO] [11:20:29.166] Trying to guess scm provider from project layout...
[INFO] [11:20:29.166] Found SCM type: svn
[INFO] [11:20:29.166] Retrieve SCM blame information...
[INFO] [11:20:29.167] Retrieve SCM blame information done: 1 ms
[INFO] [11:20:29.167] Sensor ScmActivitySensor done: 1 ms
...
[INFO] [11:20:29.167] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee...
[INFO] [11:20:29.167] Collection SCM Change log for the last 0 days
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[WARN] [11:20:29.196] Fail to retrieve SCM info. Reason: The svn command
failed.
svn: E170001: Unable to connect to a repository at URL
' http://localhost/darwin/moduleA/trunk '
svn: E170001: OPTIONS of ' http://localhost/darwin/moduleA/trunk ':
authorization failed: Could not authenticate to server: rejected Basic
challenge ( http://localhost )

[INFO] [11:20:29.196] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee done: 29 ms

Did I missed something?

thanks



--
View this message in context: http://sonar.15.n6.nabble.com/SCM-credentials-for-SCM-Stast-plugin-tp5003882p5009615.html
Sent from the Sonar user mailing list archive at Nabble.com.



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SCM credentials for SCM Stast plugin

Patroklos Papapetrou
Hi 

After a short research and a very helpful discussuion in Sonar's dev mailing list (thank you Simon!) I think I found the solution το your problem. 
Here we go: sonar.scm.user.secured and sonar.scm.password.secured properties end with secured which means that we need to authenticate the analyzer to use them. So you have two possible solutions.

A) If you've set these properties at project or global settings then use/set the sonar.login and sonar.password properties in your analyzer to authenticate it.

B) You can set sonar.scm.user.secured and sonar.scm.password.secured properties directly in your analyzer wihtout specifying the  sonar.login and sonar.password properties.

For example if you use maven then in case A (scm properties set in project/global settings) the maven cmd could be like this 
mvn sonar:sonar -Dsonar.login=admin -Dsonar.password=admin  
and in case B (scm properties set directly to analyzer) like this 
mvn sonar:sonar -Dsonar.scm.user.secured=<SCM_USER> -Dsonar.scm.passoword.secured=<SCM_PWD>




2013/3/8 Patroklos Papapetrou <[hidden email]>
I'm looking also at the plugin's code to see if something's wrong with reading the properties of the SCM Activity plugin.
Seems that there's problem as well, but I can't tell you right now if it's the root of your issues...
I'll let you know
2013/3/8 <[hidden email]>

Hi

you are right: I'm facing the same issue.
I'm running sonar with the Jenkins (1.504) and its plugin (2.0.1) and this project is a maven (3.0.5) project.
The SVN URL is available in the POM:
        <scm>
                <connection>scm:svn:http://localhost/darwin/moduleA/trunk</connection>
                <developerConnection>scm:svn:http://localhost/darwin/moduleA/trunk</developerConnection>
                <url>http://localhost/darwin/moduleA/trunk</url>
        </scm>
The SCM activity properties are set as following:
        sonar.scm.enabled=true
        sonar.scm.password.secured=<same as Jenkins>
        sonar.scm.threadCount=4
        sonar.scm.user.secured=<same as Jenkins>
And the log in debug mode:
        [INFO] [12:06:28.470] Sensor ScmActivitySensor...
        [INFO] [12:06:28.470] Trying to guess scm provider from project layout...
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.svn
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.git
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.hg
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.bzr
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/.svn
        [INFO] [12:06:28.470] Found SCM type: svn
        [INFO] [12:06:28.470] Retrieve SCM blame information...
        [DEBUG] [12:06:28.494] File changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppITCase.java
        [DEBUG] [12:06:28.496] File changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java
        [DEBUG] [12:06:28.495] File not changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/main/java/com/axway/moduleA/module2/App.java
        [INFO] [12:06:28.496] Retrieve SCM info for /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppITCase.java
        [INFO] [12:06:28.497] Retrieve SCM info for /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java
        [INFO] [12:06:28.548] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2 && svn --non-interactive --trust-server-cert blame --xml AppTest.java
        [INFO] [12:06:28.548] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2
        [INFO] [12:06:28.549] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2 && svn --non-interactive --trust-server-cert blame --xml AppITCase.java
        [INFO] [12:06:28.549] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2
        [WARN] [12:06:28.593] Fail to retrieve SCM info of: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java. Reason: The svn command failed.
        svn: E170001: Unable to connect to a repository at URL 'http://localhost/darwin/moduleA/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java'
        svn: E170001: OPTIONS of 'http://localhost/darwin/moduleA/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java': authorization failed: Could not authenticate to server: rejected Basic challenge (http://localhost)

I will investigate what the SVN blame command is supposed to do.

thanks for your help

----- Mail original -----
De: "Patroklos Papapetrou" <[hidden email]>
À: [hidden email]
Envoyé: Jeudi 7 Mars 2013 20:07:50
Objet: Re: [sonar-user] Re: SCM credentials for SCM Stast plugin

Hi


It seems that you're facing a similar problem as described in this post :
http://sonar.15.n6.nabble.com/svn-Could-not-authenticate-to-server-td5008536.html
Could you please tell me how do you trigger the analysis and how do you pass the parameters ( project settings, global settings or command line )



Regards

Patroklos Papapetrou

Co-Author of Sonar in Action

http://gr.linkedin.com/in/ppapapetrou

http://twitter.com/ppapapetrou76


2013/3/7 drautureau < [hidden email] >


Hi,
I just updated the plugin on my environment and validate the issue
http://jira.codehaus.org/browse/SONARPLUGINS-2324 .
Unfortunately, it seems that the properties sonar.scm.user.secured and
sonar.scm.password.secured are not retrieved from SCMActivity configuration:
[INFO] [11:20:29.166] Sensor
org.sonar.plugins.buildstability.BuildStabilitySensor@421e0e35 done: 873 ms
[INFO] [11:20:29.166] Sensor ScmActivitySensor...
[INFO] [11:20:29.166] Trying to guess scm provider from project layout...
[INFO] [11:20:29.166] Found SCM type: svn
[INFO] [11:20:29.166] Retrieve SCM blame information...
[INFO] [11:20:29.167] Retrieve SCM blame information done: 1 ms
[INFO] [11:20:29.167] Sensor ScmActivitySensor done: 1 ms
...
[INFO] [11:20:29.167] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee...
[INFO] [11:20:29.167] Collection SCM Change log for the last 0 days
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[WARN] [11:20:29.196] Fail to retrieve SCM info. Reason: The svn command
failed.
svn: E170001: Unable to connect to a repository at URL
' http://localhost/darwin/moduleA/trunk '
svn: E170001: OPTIONS of ' http://localhost/darwin/moduleA/trunk ':
authorization failed: Could not authenticate to server: rejected Basic
challenge ( http://localhost )

[INFO] [11:20:29.196] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee done: 29 ms

Did I missed something?

thanks



--
View this message in context: http://sonar.15.n6.nabble.com/SCM-credentials-for-SCM-Stast-plugin-tp5003882p5009615.html
Sent from the Sonar user mailing list archive at Nabble.com.



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SCM credentials for SCM Stast plugin

Patroklos Papapetrou
I also updated the documentation ( http://docs.codehaus.org/display/SONAR/SCM+Stats+Plugin ) to include these findings :)
Regards


2013/3/9 Patroklos Papapetrou <[hidden email]>
Hi 

After a short research and a very helpful discussuion in Sonar's dev mailing list (thank you Simon!) I think I found the solution το your problem. 
Here we go: sonar.scm.user.secured and sonar.scm.password.secured properties end with secured which means that we need to authenticate the analyzer to use them. So you have two possible solutions.

A) If you've set these properties at project or global settings then use/set the sonar.login and sonar.password properties in your analyzer to authenticate it.

B) You can set sonar.scm.user.secured and sonar.scm.password.secured properties directly in your analyzer wihtout specifying the  sonar.login and sonar.password properties.

For example if you use maven then in case A (scm properties set in project/global settings) the maven cmd could be like this 
mvn sonar:sonar -Dsonar.login=admin -Dsonar.password=admin  
and in case B (scm properties set directly to analyzer) like this 
mvn sonar:sonar -Dsonar.scm.user.secured=<SCM_USER> -Dsonar.scm.passoword.secured=<SCM_PWD>

2013/3/8 Patroklos Papapetrou <[hidden email]>
I'm looking also at the plugin's code to see if something's wrong with reading the properties of the SCM Activity plugin.
Seems that there's problem as well, but I can't tell you right now if it's the root of your issues...
I'll let you know
2013/3/8 <[hidden email]>

Hi

you are right: I'm facing the same issue.
I'm running sonar with the Jenkins (1.504) and its plugin (2.0.1) and this project is a maven (3.0.5) project.
The SVN URL is available in the POM:
        <scm>
                <connection>scm:svn:http://localhost/darwin/moduleA/trunk</connection>
                <developerConnection>scm:svn:http://localhost/darwin/moduleA/trunk</developerConnection>
                <url>http://localhost/darwin/moduleA/trunk</url>
        </scm>
The SCM activity properties are set as following:
        sonar.scm.enabled=true
        sonar.scm.password.secured=<same as Jenkins>
        sonar.scm.threadCount=4
        sonar.scm.user.secured=<same as Jenkins>
And the log in debug mode:
        [INFO] [12:06:28.470] Sensor ScmActivitySensor...
        [INFO] [12:06:28.470] Trying to guess scm provider from project layout...
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.svn
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.git
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.hg
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.bzr
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/.svn
        [INFO] [12:06:28.470] Found SCM type: svn
        [INFO] [12:06:28.470] Retrieve SCM blame information...
        [DEBUG] [12:06:28.494] File changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppITCase.java
        [DEBUG] [12:06:28.496] File changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java
        [DEBUG] [12:06:28.495] File not changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/main/java/com/axway/moduleA/module2/App.java
        [INFO] [12:06:28.496] Retrieve SCM info for /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppITCase.java
        [INFO] [12:06:28.497] Retrieve SCM info for /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java
        [INFO] [12:06:28.548] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2 && svn --non-interactive --trust-server-cert blame --xml AppTest.java
        [INFO] [12:06:28.548] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2
        [INFO] [12:06:28.549] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2 && svn --non-interactive --trust-server-cert blame --xml AppITCase.java
        [INFO] [12:06:28.549] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2
        [WARN] [12:06:28.593] Fail to retrieve SCM info of: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java. Reason: The svn command failed.
        svn: E170001: Unable to connect to a repository at URL 'http://localhost/darwin/moduleA/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java'
        svn: E170001: OPTIONS of 'http://localhost/darwin/moduleA/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java': authorization failed: Could not authenticate to server: rejected Basic challenge (http://localhost)

I will investigate what the SVN blame command is supposed to do.

thanks for your help

----- Mail original -----
De: "Patroklos Papapetrou" <[hidden email]>
À: [hidden email]
Envoyé: Jeudi 7 Mars 2013 20:07:50
Objet: Re: [sonar-user] Re: SCM credentials for SCM Stast plugin

Hi


It seems that you're facing a similar problem as described in this post :
http://sonar.15.n6.nabble.com/svn-Could-not-authenticate-to-server-td5008536.html
Could you please tell me how do you trigger the analysis and how do you pass the parameters ( project settings, global settings or command line )



Regards

Patroklos Papapetrou

Co-Author of Sonar in Action

http://gr.linkedin.com/in/ppapapetrou

http://twitter.com/ppapapetrou76


2013/3/7 drautureau < [hidden email] >


Hi,
I just updated the plugin on my environment and validate the issue
http://jira.codehaus.org/browse/SONARPLUGINS-2324 .
Unfortunately, it seems that the properties sonar.scm.user.secured and
sonar.scm.password.secured are not retrieved from SCMActivity configuration:
[INFO] [11:20:29.166] Sensor
org.sonar.plugins.buildstability.BuildStabilitySensor@421e0e35 done: 873 ms
[INFO] [11:20:29.166] Sensor ScmActivitySensor...
[INFO] [11:20:29.166] Trying to guess scm provider from project layout...
[INFO] [11:20:29.166] Found SCM type: svn
[INFO] [11:20:29.166] Retrieve SCM blame information...
[INFO] [11:20:29.167] Retrieve SCM blame information done: 1 ms
[INFO] [11:20:29.167] Sensor ScmActivitySensor done: 1 ms
...
[INFO] [11:20:29.167] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee...
[INFO] [11:20:29.167] Collection SCM Change log for the last 0 days
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[WARN] [11:20:29.196] Fail to retrieve SCM info. Reason: The svn command
failed.
svn: E170001: Unable to connect to a repository at URL
' http://localhost/darwin/moduleA/trunk '
svn: E170001: OPTIONS of ' http://localhost/darwin/moduleA/trunk ':
authorization failed: Could not authenticate to server: rejected Basic
challenge ( http://localhost )

[INFO] [11:20:29.196] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee done: 29 ms

Did I missed something?

thanks



--
View this message in context: http://sonar.15.n6.nabble.com/SCM-credentials-for-SCM-Stast-plugin-tp5003882p5009615.html
Sent from the Sonar user mailing list archive at Nabble.com.



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SCM credentials for SCM Stast plugin

drautureau
Thanks for this helpful clarification, everything is working now.
FYI, as I used the Jenkins sonar plugin and I'm in case A, I filled the 2 properties (global settings):
* Sonar account login
* Sonar account password
of the Jenkins Sonar plugin.
So the password can not be read from the build log.

----- Mail original -----
De: "Patroklos Papapetrou" <[hidden email]>
À: [hidden email]
Envoyé: Samedi 9 Mars 2013 15:17:54
Objet: Re: [sonar-user] Re: SCM credentials for SCM Stast plugin

I also updated the documentation (  http://docs.codehaus.org/display/SONAR/SCM+Stats+Plugin ) to include these findings :)
Regards



Patroklos Papapetrou

Co-Author of Sonar in Action

http://gr.linkedin.com/in/ppapapetrou 

http://twitter.com/ppapapetrou76 


2013/3/9 Patroklos Papapetrou < [hidden email] >


Hi 


After a short research and a very helpful discussuion in Sonar's dev mailing list (thank you Simon!) I think I found the solution το your problem.
Here we go: sonar.scm.user.secured and sonar.scm.password.secured  properties end with secured which means that we need to authenticate the analyzer to use them. So you have two possible solutions.


A) If you've set these properties at project or global settings then use/set the sonar.login and sonar.password properties in your analyzer to authenticate it.


B) You can set  sonar.scm.user.secured and sonar.scm.password.secured properties directly in your analyzer wihtout specifying the    sonar.login and sonar.password properties.


For example if you use maven then in case A (scm properties set in project/global settings) the maven cmd could be like this 
mvn sonar:sonar -Dsonar.login=admin -Dsonar.password=admin   
and in case B (scm properties set directly to analyzer) like this 
mvn sonar:sonar -Dsonar.scm.user.secured=<SCM_USER>  -Dsonar.scm.passoword.secured=<SCM_PWD>







Patroklos Papapetrou

Co-Author of Sonar in Action

http://gr.linkedin.com/in/ppapapetrou 

http://twitter.com/ppapapetrou76 




2013/3/8 Patroklos Papapetrou < [hidden email] >


I'm looking also at the plugin's code to see if something's wrong with reading the properties of the SCM Activity plugin.
Seems that there's problem as well, but I can't tell you right now if it's the root of your issues...
I'll let you know




Regards


Patroklos Papapetrou

Co-Author of Sonar in Action

http://gr.linkedin.com/in/ppapapetrou 

http://twitter.com/ppapapetrou76 


2013/3/8 < [hidden email] >




Hi

you are right: I'm facing the same issue.
I'm running sonar with the Jenkins (1.504) and its plugin (2.0.1) and this project is a maven (3.0.5) project.
The SVN URL is available in the POM:
        <scm>
                <connection>scm:svn: http://localhost/darwin/moduleA/trunk </connection>
                <developerConnection>scm:svn: http://localhost/darwin/moduleA/trunk </developerConnection>
                <url> http://localhost/darwin/moduleA/trunk </url>
        </scm>
The SCM activity properties are set as following:
        sonar.scm.enabled=true
        sonar.scm.password.secured=<same as Jenkins>
        sonar.scm.threadCount=4
        sonar.scm.user.secured=<same as Jenkins>
And the log in debug mode:
        [INFO] [12:06:28.470] Sensor ScmActivitySensor...
        [INFO] [12:06:28.470] Trying to guess scm provider from project layout...
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.svn
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.git
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.hg
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/.bzr
        [DEBUG] [12:06:28.470] Search for: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/.svn
        [INFO] [12:06:28.470] Found SCM type: svn
        [INFO] [12:06:28.470] Retrieve SCM blame information...
        [DEBUG] [12:06:28.494] File changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppITCase.java
        [DEBUG] [12:06:28.496] File changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java
        [DEBUG] [12:06:28.495] File not changed since previous analysis: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/main/java/com/axway/moduleA/module2/App.java
        [INFO] [12:06:28.496] Retrieve SCM info for /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppITCase.java
        [INFO] [12:06:28.497] Retrieve SCM info for /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java
        [INFO] [12:06:28.548] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2 && svn --non-interactive --trust-server-cert blame --xml AppTest.java
        [INFO] [12:06:28.548] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2
        [INFO] [12:06:28.549] Executing: /bin/sh -c cd /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2 && svn --non-interactive --trust-server-cert blame --xml AppITCase.java
        [INFO] [12:06:28.549] Working directory: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2
        [WARN] [12:06:28.593] Fail to retrieve SCM info of: /var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java. Reason: The svn command failed.
        svn: E170001: Unable to connect to a repository at URL ' http://localhost/darwin/moduleA/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java '
        svn: E170001: OPTIONS of ' http://localhost/darwin/moduleA/trunk/module2/src/test/java/com/axway/moduleA/module2/AppTest.java ': authorization failed: Could not authenticate to server: rejected Basic challenge ( http://localhost )

I will investigate what the SVN blame command is supposed to do.

thanks for your help

----- Mail original -----
De: "Patroklos Papapetrou" < [hidden email] >
À: [hidden email]
Envoyé: Jeudi 7 Mars 2013 20:07:50
Objet: Re: [sonar-user] Re: SCM credentials for SCM Stast plugin



Hi


It seems that you're facing a similar problem as described in this post :
http://sonar.15.n6.nabble.com/svn-Could-not-authenticate-to-server-td5008536.html 
Could you please tell me how do you trigger the analysis and how do you pass the parameters ( project settings, global settings or command line )



Regards

Patroklos Papapetrou

Co-Author of Sonar in Action

http://gr.linkedin.com/in/ppapapetrou 

http://twitter.com/ppapapetrou76 


2013/3/7 drautureau < [hidden email] >


Hi,
I just updated the plugin on my environment and validate the issue
http://jira.codehaus.org/browse/SONARPLUGINS-2324 .
Unfortunately, it seems that the properties sonar.scm.user.secured and
sonar.scm.password.secured are not retrieved from SCMActivity configuration:
[INFO] [11:20:29.166] Sensor
org.sonar.plugins.buildstability.BuildStabilitySensor@421e0e35 done: 873 ms
[INFO] [11:20:29.166] Sensor ScmActivitySensor...
[INFO] [11:20:29.166] Trying to guess scm provider from project layout...
[INFO] [11:20:29.166] Found SCM type: svn
[INFO] [11:20:29.166] Retrieve SCM blame information...
[INFO] [11:20:29.167] Retrieve SCM blame information done: 1 ms
[INFO] [11:20:29.167] Sensor ScmActivitySensor done: 1 ms
...
[INFO] [11:20:29.167] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee...
[INFO] [11:20:29.167] Collection SCM Change log for the last 0 days
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk 
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk 
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk 
[INFO] [11:20:29.167] Executing: /bin/sh -c cd
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk && svn
--non-interactive --trust-server-cert log -v
http://localhost/darwin/moduleA/trunk 
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[INFO] [11:20:29.167] Working directory:
/var/lib/axway/cijenkins/jobs/ModuleA/workspace/trunk
[WARN] [11:20:29.196] Fail to retrieve SCM info. Reason: The svn command
failed.
svn: E170001: Unable to connect to a repository at URL
' http://localhost/darwin/moduleA/trunk '
svn: E170001: OPTIONS of ' http://localhost/darwin/moduleA/trunk ':
authorization failed: Could not authenticate to server: rejected Basic
challenge ( http://localhost )

[INFO] [11:20:29.196] Sensor
org.sonar.plugins.scmstats.ScmStatsSensor@6f4c58ee done: 29 ms

Did I missed something?

thanks



--
View this message in context: http://sonar.15.n6.nabble.com/SCM-credentials-for-SCM-Stast-plugin-tp5003882p5009615.html 
Sent from the Sonar user mailing list archive at Nabble.com.



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email 



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email 





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...