[JIRA] (JENKINS-14506) SCM Sync Configuration mess with Git authentication

2012-07-25 Thread jcarsi...@java.net (JIRA)














































Julien Carsique
 commented on  JENKINS-14506


SCM Sync Configuration mess with Git authentication















Created related issues.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-14506) SCM Sync Configuration mess with Git authentication

2012-07-25 Thread fcamb...@java.net (JIRA)














































Frédéric Camblor
 commented on  JENKINS-14506


SCM Sync Configuration mess with Git authentication















@Julien I think you're right concerning the lack of extractScmCredentials() implementation.
Problem is known by Bertrand. Authentication is mostly one of the more difficult part in implementing a new SCM implementation in scm-sync-configuration.

Even I, with subversion implementation, am not able to fulfill every cases (see JENKINS-8871)



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-14506) SCM Sync Configuration mess with Git authentication

2012-07-19 Thread jcarsi...@java.net (JIRA)














































Julien Carsique
 created  JENKINS-14506


SCM Sync Configuration mess with Git authentication















Issue Type:


Bug



Assignee:


Bertrand Paquet



Components:


scm-sync-configuration



Created:


19/Jul/12 4:06 PM



Description:


Using GitHub, I hardly managed credential issues:


	I tried to configure the repository with various URLs/protocols which all work fine inside jobs but not for that plugin, always raising the issue below
	The server fails at committing because of

hudson.plugins.scm_sync_configuration.ScmSyncConfigurationBusiness synchronizeFile
INFO: Synchronizing file [jobs/nuxeo/config.xml] to SCM ...
hudson.plugins.scm_sync_configuration.SCMManipulator checkinFiles
SEVERE: [checkinFiles] Problem during commit of [[jobs/nuxeo/config.xml]] : 
*** Please tell me who you are.

Run

  git config --global user.email "y...@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident  hud...@someslave.in.nuxeo.com not allowed

	setting global config doesn't solve the issue
	of course, those settings are already configured in the Git section
	finally, defining those values as local settings worked



The main issues are:

	the error message is wrong,
	since the fix requires the repository to exist and that repository is created/deleted by the plugin, it cannot be properly configured without raising the issue before (which is an issue when working with a lot of jobs),
	when the URLs fails at login (not for commit but for pull/push), the Jenkins server becomes unresponsive (I had to manually kill the git processes).



I don't know exactly what comes from the GitGitHub plugins or JGit but it seems the scm_sync plugin is not using all available information, especially the user.email and user.name.

There should be a "test" button in the configuration to avoid starting initialization with repetitive failures.




Project:


Jenkins



Priority:


Major



Reporter:


Julien Carsique

























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-14506) SCM Sync Configuration mess with Git authentication

2012-07-19 Thread jcarsi...@java.net (JIRA)














































Julien Carsique
 commented on  JENKINS-14506


SCM Sync Configuration mess with Git authentication















Has the issue something to do with the following code in your contribution?

public SCMCredentialConfiguration extractScmCredentials(String scmUrl) {
  return null;
}


And the Unit Test seems to use a repository without credentials.

Before I succeeded by configuring local Git properties for user.name and user.email, I was really wondering if the plugin was able to use a Git repository with authentication...



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-14506) SCM Sync Configuration mess with Git authentication

2012-07-19 Thread jcarsi...@java.net (JIRA)














































Julien Carsique
 updated  JENKINS-14506


SCM Sync Configuration mess with Git authentication
















Change By:


Julien Carsique
(19/Jul/12 4:15 PM)




Description:


UsingGitHub,Ihardlymanagedcredential
/identity
issues:-ItriedtoconfiguretherepositorywithvariousURLs/protocolswhichallworkfineinsidejobsbutnotforthatplugin,alwaysraisingtheissuebelow-Theserverfailsatcommittingbecauseof{code}hudson.plugins.scm_sync_configuration.ScmSyncConfigurationBusinesssynchronizeFileINFO:Synchronizingfile[jobs/nuxeo/config.xml]toSCM...hudson.plugins.scm_sync_configuration.SCMManipulatorcheckinFilesSEVERE:[checkinFiles]Problemduringcommitof[[jobs/nuxeo/config.xml]]:***Pleasetellmewhoyouare.Rungitconfig--globaluser.emaily...@example.comgitconfig--globaluser.nameYourNametosetyouraccountsdefaultidentity.Omit--globaltosettheidentityonlyinthisrepository.fatal:emptyidenthud...@someslave.in.nuxeo.comnotallowed{code}-settingglobalconfigdoesntsolvetheissue-ofcourse,thosesettingsarealreadyconfiguredintheGitsection-finally,definingthosevaluesaslocalsettingsworkedThemainissuesare:-theerrormessageiswrong,-sincethefixrequirestherepositorytoexistandthatrepositoryiscreated/deletedbytheplugin,itcannotbeproperlyconfiguredwithoutraisingtheissuebefore(whichisanissuewhenworkingwithalotofjobs),-whentheURLsfailsatlogin(notforcommitbutforpull/push),theJenkinsserverbecomesunresponsive(Ihadtomanuallykillthegitprocesses).IdontknowexactlywhatcomesfromtheGitGitHubpluginsorJGitbutitseemsthescm_syncpluginisnotusingallavailableinformation,especiallythe{{user.email}} and{{user.name}}.Thereshouldbeatestbuttonintheconfigurationtoavoidstartinginitializationwithrepetitivefailures.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira