Problem
$ git archive --remote=ssh://localhost:29418/linux master:/usr/src/linux/drivers/media Kconfig
fatal: internal server error
In gerrit error.log file:
[2016-07-21 13:19:24,777] [SSH git-upload-archive '/linux' (jenkins)] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user jenkins account 1000000) during git-upload-archive '/linux'
org.eclipse.jgit.errors.IncorrectObjectTypeException: Object e92d8bdad96bb9b98b49786dcffbe9b0a128e665 is not a commit.
at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:774)
at com.google.gerrit.sshd.commands.UploadArchive.canRead(UploadArchive.java:220)
at com.google.gerrit.sshd.commands.UploadArchive.runImpl(UploadArchive.java:170)
at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:101)
at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:32)
at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:70)
at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:437)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:377)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Solution
Just add Read permission for your user for reference refs/meta/config or refs/*