Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14506

SCM Sync Configuration mess with Git authentication

XMLWordPrintable

      Using GitHub, I hardly managed credential/identity 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 "you@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  <hudson@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 Git&GitHub 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.

            bpaquet Bertrand Paquet
            jcarsique Julien Carsique
            Votes:
            4 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: