Issue Type: Bug Bug
Assignee: Nicolas De Loof
Attachments: git-plugin.png, Jenkins-Git-failed-full-log.txt
Components: git
Created: 10/Jun/14 2:53 AM
Description:

The error shows as below because of the specified colors set in the ~/.gitconfig:

 > git config core.sparsecheckout
 > git checkout -f 0bd22591afff0f67e84f9ce97365e1772351b3ce
 > git branch -a
 > git rev-parse  [1;32m(detached from 0bd2259) [m^{commit}
FATAL: Could not checkout HEAD with start point 0bd22591afff0f67e84f9ce97365e1772351b3ce
hudson.plugins.git.GitException: Could not checkout HEAD with start point 0bd22591afff0f67e84f9ce97365e1772351b3ce
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1497)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:896)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1252)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
	at hudson.model.Run.execute(Run.java:1710)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:231)
Caused by: hudson.plugins.git.GitException: Command "git rev-parse  [1;32m(detached from 0bd2259) [m^{commit}" returned status code 128:
stdout:  [1;32m(detached from 0bd2259) [m^{commit}

stderr: fatal: ambiguous argument ' [1;32m(detached from 0bd2259) [m^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

The full log has been attached.

The color settings as blow, details can be found from my github:

{noforamt}

[color]
ui = true
log = always
status = always
add = always
push = always
pull = always
diff = always
branch = always
interactive = auto
[color "branch"]
current = green bold
local = yellow
remote = red
[color "status"]
added = yellow
changed = red bold
untracked = magenta normal dim
[color "diff"]
meta = blue bold
frag = magenta
old = red bold
new = green bold
whitespace = red reverse


Can git plugin "ignore" the settings automatically (the settings like colors). I've Created a question in stackoverflow

Environment: Linux (Ubuntu 14.04 & SUSE Linux Enterprise Server 10 SP3), Jenkins 1.566, GIT plugin 2.2.1
Project: Jenkins
Labels: git gitplugin gitconfig
Priority: Major Major
Reporter: Marslo Jiao
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to