Git unable to create temp-file during indexing on Windows
症状
Fisheye fails to index your Git repository with an error that contains fatal: unable to create temp-file: No such file or directory.
例:
2011-09-09 11:40:06,790 ERROR [InitialPinger1 your-repository] fisheye.app BaseRepositoryScanner-handleSlurpException - Problem processing revisions from repo your-repository due to class com.cenqua.fisheye.rep.RepositoryClientException - com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS:
com.cenqua.fisheye.rep.RepositoryClientException: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS:
at com.atlassian.fisheye.dvcs.DvcsScanner.processRevisions(DvcsScanner.java:300)
at com.cenqua.fisheye.rep.BaseRepositoryScanner.slurpRepository(BaseRepositoryScanner.java:255)
at com.cenqua.fisheye.rep.BaseRepositoryScanner.doSlurpTransaction(BaseRepositoryScanner.java:223)
at com.cenqua.fisheye.rep.BaseRepositoryScanner.ping(BaseRepositoryScanner.java:182)
at com.cenqua.fisheye.rep.BaseRepositoryEngine.doSlurp(BaseRepositoryEngine.java:92)
at com.cenqua.fisheye.rep.RepositoryEngine.slurp(RepositoryEngine.java:379)
at com.cenqua.fisheye.rep.ping.OneOffPingRequest.doRequest(OneOffPingRequest.java:28)
at com.cenqua.fisheye.rep.ping.PingRequest.process(PingRequest.java:67)
at com.cenqua.fisheye.rep.RepositoryHandle.processPingRequests(RepositoryHandle.java:138)
at com.cenqua.fisheye.rep.RepositoryHandle.queuePingRequest(RepositoryHandle.java:128)
at com.cenqua.fisheye.rep.ping.PingRequest.run(PingRequest.java:33)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS:
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:214)
at com.atlassian.fisheye.git.GitScanner.processChanges(GitScanner.java:977)
at com.atlassian.fisheye.git.GitScanner.slurpCommits(GitScanner.java:950)
at com.atlassian.fisheye.dvcs.DvcsScanner.processBranch(DvcsScanner.java:401)
at com.atlassian.fisheye.dvcs.DvcsScanner.processRevisions(DvcsScanner.java:254)
... 13 more
Caused by: com.atlassian.utils.process.ProcessException: While executing: "git whatchanged --always --reverse --date-order -m --no-abbrev --no-renames c01d860605915f58dfb3ddb2f55b9ea278aaae49..de2e82d2918de8f6bb8a0f5565bb58a8d80db947 --pretty=format:C:%H%nP:%P%nA:%aN%nE:%aE%nR:%cN%nF:%cE%nD:%at%nS:%s%nB:%b%n@@fe_body_end@@ "
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:262)
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:254)
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:212)
... 17 more
Caused by: com.atlassian.utils.process.ProcessException: com.atlassian.fisheye.dvcs.handler.DvcsProcessRuntimeException: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS: fatal: unable to create temp-file: No such file or directory
at com.atlassian.utils.process.ExternalProcessImpl$4.doTask(ExternalProcessImpl.java:273)
at com.atlassian.utils.process.LatchedRunnable.run(LatchedRunnable.java:25)
... 3 more
Caused by: com.atlassian.fisheye.dvcs.handler.DvcsProcessRuntimeException: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS: fatal: unable to create temp-file: No such file or directory
at com.atlassian.fisheye.git.GitScanner$9.processCommit(GitScanner.java:1056)
at com.atlassian.fisheye.git.client.GitChangeParser.handleCommit(GitChangeParser.java:217)
at com.atlassian.fisheye.git.client.GitChangeParser.scanPaths(GitChangeParser.java:157)
at com.atlassian.fisheye.git.client.GitChangeParser.processLine(GitChangeParser.java:61)
at com.atlassian.utils.process.LineOutputHandler.process(LineOutputHandler.java:49)
at com.atlassian.utils.process.LineOutputHandler.process(LineOutputHandler.java:36)
at com.atlassian.utils.process.PluggableProcessHandler.processOutput(PluggableProcessHandler.java:34)
at com.atlassian.utils.process.ExternalProcessImpl$4.doTask(ExternalProcessImpl.java:270)
... 4 more
Caused by: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS: fatal: unable to create temp-file: No such file or directory
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:214)
at com.atlassian.fisheye.git.GitScanner.getDiffInfo(GitScanner.java:1001)
at com.atlassian.fisheye.git.GitScanner.processGitCommit(GitScanner.java:545)
at com.atlassian.fisheye.git.GitScanner$9.processCommit(GitScanner.java:1054)
... 11 more
Caused by: com.atlassian.utils.process.ProcessException: While executing: "git diff --no-renames --no-abbrev --full-index -U0 a6197099ecc735ef4175dfd3832a0e72ced6bf07..db206a42822af14fed36003f131c5a20cc12b15f "
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:262)
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:254)
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:212)
... 14 more
Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 128
at com.atlassian.utils.process.PluggableProcessHandler.complete(PluggableProcessHandler.java:83)
at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:308)
at com.atlassian.utils.process.ExternalProcessImpl.execute(ExternalProcessImpl.java:351)
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:259)
... 16 more
原因
For some reason the Git binary is unable to create a temp file. This may be because you are out of disk space, or more likely, your TMPDIR
environment variable is incorrectly set. This will sometimes happen if you are have cygwin installed on the local machine but are running Fisheye from the Windows command shell.
診断
To check if this is the case, type the following at the command-line:
set TMPDIR
If the output is something like /cygdrive/c/blah
or the environment variable otherwise references a non-existent directory, see Resolution below.
ソリューション
1. Clear the environment variable by typing:
set TMPDIR=
2. Restart Fisheye/Crucible. The next time an incremental index is triggered (either after the next polling period for a Git repository with Updates enabled, or after the next push for an internal Git repository) the repository should index normally.
Environment variables modified using set
will only retain their updated values until the command shell window is closed. To permanently fix this problem, you'll need to permanently clear the TMPDIR
environment variable - see Environment variables for instructions on doing this.