-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 1.559
git plugin 2.2.1
git-client plugin 1.8.0
multiple-scms plugin 0.3
RHEL6 master with RHEL5 slave
We have a job which passes the GIT_URL as a string parameter, supplied by the user. When the user does a Copy + Paste into the value field, sometimes a trailing whitespace is included. This appears to mess the plugin up somehow.
We are also using multiSCM, but I doubt it's related to the underlying issue.
If the Git URL is configured in the job config, the trailing whitespace is automatically trimmed when the job configuration is saved into config.xml. So this is only an issue if the GIT_URL is provided as a parameter to the job.
When the Git URL is a parameter, the whitespace is not trimmed, and the job fails during git fetch with the following log output:
Cloning repository git://my/git/URL.git
Fetching upstream changes from git://my/git/URL.git
FATAL: Failed to fetch from git://my/git/URL.git
hudson.plugins.git.GitException: Failed to fetch from git://my/git/URL.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java.623)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java.855)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:880)
at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:118)
at ...
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress git://my/git/URL.git +refs/heads/:refs/remotes/origin/" returned status code 128:
stdout:
stderr: fatal: The remote end hung up unexpectedly
at org.jenkinssci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1146)
at ...
Not a big deal, as long as we know to trim the whitespace manually.
Sorry, the issue tracker is interpreting some of the log output as wiki markup. Here is what's actually in the log: