How can I see the output of the git command in my Jenkins Console Log for build?

I have created and built Jenkins caused by git transactions and all that. An example log is as follows:

00:00:00.016 Building in workspace D:\SomeWorkspace
00:00:00.016  > C:\Program Files (x86)\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
00:00:00.047 Fetching changes from the remote Git repository
00:00:00.047  > C:\Program Files (x86)\Git\bin\git.exe config remote.origin.url http://usr:pwd@gitRepoAddress.git/git/Repo.git # timeout=10
00:00:00.063 Fetching upstream changes from http://usr@gitRepoAddress.git/git/Repo.git
00:00:00.063  > C:\Program Files (x86)\Git\bin\git.exe --version # timeout=10
00:00:00.234 using .gitcredentials to set credentials
00:00:00.234  > C:\Program Files (x86)\Git\bin\git.exe config --local credential.helper store --file=\"C:\Path\To\Temp\git2724877017172338447.credentials\" # timeout=10
00:00:00.250  > C:\Program Files (x86)\Git\bin\git.exe fetch --tags --progress http://usr@gitRepoAddress.git/git/Repo.git +refs/heads/*:refs/remotes/origin/*

What I would like to do is to see the output from these git commands so that I can do things like double check which version of git to use, see why it git fetchis slow, etc., but I can not find out how to display this additional output. Any ideas? When I run these commands from git - bash, which I installed in this window, it git fetchworks faster, and I'm not sure how to debug what is happening in Jenkins.

+4
source share
1

Jenkins git, "git.exe" Java JGit. .

, "", , .

fetch ( "master" ):

https://github.com/jenkinsci/git-client-plugin/blob/1a450a5ee993209cc9f27f2a4bfb31bc08a33257/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L242

execute(), 313 launchCommandWithCredentials(...);, . , .

: launchCommandWithCredentials 1337. 1441 launchCommandIn(...);, , , , 1672. 1689 , , 1691 . 0, .. , ( ) 1693, . , , launchCommandWithCredentials 1441. 313, .

checkout, , .

, ,

+1

All Articles