I couldn't find any way of entering Git credentials that the 
scm-sync-configuration would use. Am I missing something?

I have created credentials for our git server, and I am able to use these 
to check out sources from the server as part of a job (over http). The git 
plugin correctly generates a temporary credentials file, and uses it when 
doing the fetch. I have failed to find any way to use these same 
credentials to authenticate when scm-sync-configuration tries to push 
changes to the same server. Viewing the git commands that 
scm-sync-configuration is issuing, it doesn't appear to be trying to use 
credentials at all. The git command-line client tries to get a password 
from the console (which doesn't work, obviously), complaining as follows 
(where the missing device is the console):

SEVERE: [checkinFiles] Problem during SCM commit : fatal: could not read 
Password for 'http://usern...@hostname.net': No such device or address

I have set up credentials as:

   - Jenkins, Credentials
      - hostname.net
      - Name: hostname.net
         - Hostname include: hostname.net
         - Username
            - Scope: Global
            - Username: username
            - Password: password
            
Git and scm-sync are configured as follows:

   - Jenkins, Configuration
      - SCM Sync configuration
         - Git repository URL: http://usern...@hostname.net/path/to/repo
         - Git
         - Name: Default
         - Path to Git: git (using the command-line git client here)
         
My work-around was to store the git credentials from the command-line, 
which isn't ideal (but does at least work):

$ git config --global credential.helper store

Is this a Git equivalent of the known Subversion issue discussed here: 
https://issues.jenkins-ci.org/browse/JENKINS-21640, or am I missing 
something obvious?

Jenkins 1.596.2 (current LTS version)
Credentials plugin 1.22
Git client plugin 1.17.1
Git plugin 2.3.5
SCM sync configuration plugin 0.0.8

... all the latest versions, as far as I know.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/2e6a5cb9-4f5d-4e8c-b9e7-e902a4327685%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to