Hi, I am trying to get a repository cloned inside a Jenkins job. The cloning operation works, but the downloaded data is way too much, and we are having issues since the site is on low bandwidth and the programmers want the workspace to be cleaned out at each run. The git repository needs authentication, and I only need the master branch. If I try to run a clone operation manually from a console, it downloads around 3,5MB of data. When the git repository needs credentials, it seems that it automatically switches to using git init + git fetch. Git fetch, though, downloads around 100MB of data for nothing from the repository. I then set the refspec setting to "+refs/heads/master:refs/remotes/origin/master". If I try to run a git fetch manually from console with that refspec, once again I get the correct 3,5MB of data that I need.
The Jenkins Git plugin at this point behaves very strangely. What I see in the log is that it first runs: "/usr/bin/git -c core.askpass=true fetch --tags --progress ***repository url here*** +refs/heads/*:refs/remotes/origin/* # timeout=30" and only after that is done it finally runs a "/usr/bin/git -c core.askpass=true fetch --tags --progress ***repository url here*** +refs/heads/master:refs/remotes/origin/master # timeout=30" This means that, deleting the workspace everytime, I still need to wait for all the 100MB of data to be downloaded again every time I run the job. Is there a reason for this behaviour? Is there also a way to inhibit it, or to force the git plugin to use clone instead of fetch? -- 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/10e38af4-0365-4a41-8fb1-8d2e641ee1d4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.