Details
-
Type:
Improvement
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Duplicate
-
Component/s: git-plugin
-
Labels:None
-
Similar Issues:
Description
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.
Attachments
Issue Links
- duplicates
-
JENKINS-28335 Pipeline step to run Git commands with credentials & tool
-
- Open
-
Bertrand Renuart I checked online the docs for Jenkins Pipeline and have found that I was able to replace your line:
if (utils.isUnixLike()) {
by
if (isUnix()) {
I'm still looking for an official way to delete the directory with an official manner since your "rmdir" is apparently also imported from your shared library ("No such DSL method 'rmdir' found among steps")