Searcher describes gitserver failing to clone repo as archive corruption error
View options
- Truncate descriptions
Created by: slimsag
When gitserver is failing to clone a repository, searcher propagates that error up to the user and presents it as if there is a corrupt archive on disk somewhere:
failed to copy and close missing archive cache item: archive/tar: invalid tar header
In reality, gitserver is just failing to produce a tar archive because the repo can't be cloned. The error message should indicate this because as an admin it is VERY difficult to debug this situation.
To reproduce this, you will just need to add a repo to sourcegraph then take down your codehost so that gitserver can't clone it (in my case, bitbucket server):
docker logs gitserver-16 2>&1 | grep 'ssw-scientific--nndd'
t=2019-05-02T20:20:21+0000 lvl=info msg="recloning expired repo" repo=50.112.230.151/TEST/ssw-scientific--nndd
t=2019-05-02T20:20:24+0000 lvl=eror msg="error running cleanup command" name="maybe reclone" repo=/data/repos/50.112.230.151/TEST/ssw-scientific--nndd/.git error="error cloning repo: repo 50.112.230.151/TEST/ssw-scientific--nndd (http://slimsag:<redacted>@10.0.0.34:7990/scm/test/ssw-scientific--nndd.git) not cloneable: exit status 128 (output follows)\n\nfatal: unable to access 'http://slimsag:<redacted>@10.0.0.34:7990/scm/test/ssw-scientific--nndd.git/': Failed to connect to 10.0.0.34 port 7990: Host is unreachable\n"
cc @sourcegraph/code-search


- Show labels
- Show closed items
Link items together to show that they're related.