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

git-client CLI implementation does not propogate username

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: git-client-plugin
    • Labels:
      None
    • Environment:
      git-plugin 2.3.5
      git-client-plugin 1.17.1
      git on slave 2.4.6
    • Similar Issues:

      Description

      I add the advanced behavior for submodules, and it fails to clone, as the slave does not use the correct credentials or username to clone the submodule

      In addition, just to clone the base project, I am forced to use the username@ format of the ssh protocol, because the project does not specify this user from the credentials.

      It probably needs to be inserted into the commands on the git-client plugin, though I am not sure exactly how to do this. The work-around solution for this is to modify the ssh_config on the host such that it knows the correct username/port/credentials for that hostname, but this is not very useful if i have to go customize tens or hundreds of slaves.

        Attachments

          Issue Links

            Activity

            Hide
            petertoft Peter Toft added a comment -

            I just tested this approach (and thank you for helping) - but I see the same problem.
            I use git-bash, which on the command line works fine (even with submodules).

            If you have other tricks or want help testing - let me know, I can support.

            Show
            petertoft Peter Toft added a comment - I just tested this approach (and thank you for helping) - but I see the same problem. I use git-bash, which on the command line works fine (even with submodules). If you have other tricks or want help testing - let me know, I can support.
            Hide
            jekeller Jacob Keller added a comment -

            I can't really help further at this point. Until submodules are properly supported with credentials this may be an issue.

            I do not know how Windows is configuring SSH and why it wouldn't read the ssh configuration file. The issue is that we don't support specifying credentials in submodules at this time, so it uses the defaults. I believe that the defaults are not working because of difference in user that is somehow corrected in your command line example.

            Show
            jekeller Jacob Keller added a comment - I can't really help further at this point. Until submodules are properly supported with credentials this may be an issue. I do not know how Windows is configuring SSH and why it wouldn't read the ssh configuration file. The issue is that we don't support specifying credentials in submodules at this time, so it uses the defaults. I believe that the defaults are not working because of difference in user that is somehow corrected in your command line example.
            Hide
            petertoft Peter Toft added a comment -
            Show
            petertoft Peter Toft added a comment - Very interesting stuff in https://github.com/jenkinsci/git-client-plugin/pull/180
            Hide
            jekeller Jacob Keller added a comment -

            Yes, that is the pull request to fix submodules. I am generally very surprised that they worked for you at all in Linux. I suspect it is because your credentials are already known and set in your .ssh/ setup.

            This pull request, unfortunately, is useless on its own as it requires setting up credentials per URL, which requires changes in the git-plugin that have not yet been accepted.

            Show
            jekeller Jacob Keller added a comment - Yes, that is the pull request to fix submodules. I am generally very surprised that they worked for you at all in Linux. I suspect it is because your credentials are already known and set in your .ssh/ setup. This pull request, unfortunately, is useless on its own as it requires setting up credentials per URL, which requires changes in the git-plugin that have not yet been accepted.
            Hide
            petertoft Peter Toft added a comment -

            A workaorund I got to work was to move the Jenkins on Windows server to be owned by the same user as the one cloning the main projects.
            Then all submodules are cloned nicely!

            Show
            petertoft Peter Toft added a comment - A workaorund I got to work was to move the Jenkins on Windows server to be owned by the same user as the one cloning the main projects. Then all submodules are cloned nicely!

              People

              • Assignee:
                jekeller Jacob Keller
                Reporter:
                jekeller Jacob Keller
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: