Add a withGit pipeline step that provides git credentials

XMLWordPrintable

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor
    • Component/s: git-plugin
    • None

      It would be nice if we had a withGit step that would pre-configure the git credentials from the current "scm" object and allows us to invoke git from the command line as follows:

      withGit {
         sh 'git fetch'
      }

      The step would rely on the same GIT_ASKPASS mechanism as used during a "standard" checkout.

       

        1. mktemp.groovy
          0.6 kB
        2. rmdir.groovy
          0.4 kB
        3. utils.groovy
          2 kB
        4. withGit.groovy
          3 kB

            Assignee:
            Unassigned
            Reporter:
            Bertrand Renuart
            Votes:
            9 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: