title: What does "upload-pack: not our ref" mean, when fetching git refs via --tags?
body: <p>In one of my projects, the Travis builds are failing before any of my build-system or code can be reached, as soon as my build-script attempts to fetch all of the Git tags with <code>git fetch --tags</code>:</p>
  
  <pre><code>`` git fetch --tags --verbose
  POST git-upload-pack (350 bytes)
  POST git-upload-pack (788 bytes)
  POST git-upload-pack (797 bytes)
  From https://github.com/ELLIOTTCABLE/bs-sedlex
   = [up to date]      fix-ci        -&gt; origin/fix-ci
   * [new tag]         sedlex-1.99.2 -&gt; sedlex-1.99.2
   * [new tag]         v1.99.3       -&gt; v1.99.3
  ...
   * [new tag]         v20.0.0-pre.2 -&gt; v20.0.0-pre.2
  Fetching submodule ppx-sedlex
  POST git-upload-pack (122 bytes)
  From https://github.com/ELLIOTTCABLE/ppx-sedlex
   = [up to date]      develop       -&gt; origin/develop
   = [up to date]      master        -&gt; origin/master
  ...
   = [up to date]      v20.0.0-pre.2 -&gt; v20.0.0-pre.2
  POST git-upload-pack (4 bytes)
  POST git-upload-pack (69 bytes)
  POST git-upload-pack (586 bytes)
  fatal: remote error: upload-pack: not our ref 0f509703fcd43ff4324d721a39220153bab49d4a
  </code></pre>
  
  <p>This is especially confusing, as neither the main repo <code>bs-sedlex</code>, nor the git-submodule <code>ppx-sedlex</code>, have any commit starting like <code>0f5097...</code>; I have no idea where that SHA is coming from. This failure is occurring only on the <strong>Linux</strong> workers, and I can't figure out why — <code>git fetch --tags</code> on that same repo works on the macOS Travis-workers, on my macOS machine, and on an Ubuntu Vagrant box I spun-up to debug this.</p>
  
  <p>What does the "fatal: remote error: upload-pack: not our ref" error signify; and how can I work around it? I'm not even sure where to begin debugging this error, as it only occurs specifically on Travis workers.</p>
  
  <p>(It's unlikely to be helpful, but here's the <a href="https://travis-ci.com/ELLIOTTCABLE/bs-sedlex/jobs/255885673#L218-L251" rel="noreferrer">error in context</a>, and <a href="https://github.com/ELLIOTTCABLE/bs-sedlex" rel="noreferrer">the repository in question</a>.)</p>
  
  <p><strong>Edit 1:</strong> Here's some additional interesting output, from adding GIT_TRACE=2:</p>
  
  <pre><code>Fetching submodule ppx-sedlex
  23:55:28.125076 git.c:439               trace: built-in: git fetch --no-prune --no-prune-tags --tags -v --recurse-submodules-default on-demand --submodule-prefix ppx-sedlex/
  23:55:28.125914 run-command.c:663       trace: run_command: git-remote-https origin https://github.com/ELLIOTTCABLE/ppx-sedlex.git
  23:55:28.429609 run-command.c:663       trace: run_command: git rev-list --objects --stdin --not --all --quiet --alternate-refs
  23:55:28.432485 run-command.c:663       trace: run_command: git rev-list --objects --stdin --not --all --quiet --alternate-refs
  23:55:28.434082 git.c:439               trace: built-in: git rev-list --objects --stdin --not --all --quiet --alternate-refs
  From https://github.com/ELLIOTTCABLE/ppx-sedlex
   = [up to date]      develop       -&gt; origin/develop
   = [up to date]      master        -&gt; origin/master
   = [up to date]      v1.99.4       -&gt; v1.99.4
   = [up to date]      v1.99.4-pre.1 -&gt; v1.99.4-pre.1
   = [up to date]      v1.99.4-pre.3 -&gt; v1.99.4-pre.3
   = [up to date]      v1.99.4-pre.8 -&gt; v1.99.4-pre.8
   = [up to date]      v2.0.0        -&gt; v2.0.0
   = [up to date]      v20.0.0-pre.1 -&gt; v20.0.0-pre.1
   = [up to date]      v20.0.0-pre.2 -&gt; v20.0.0-pre.2
  23:55:28.442482 run-command.c:1616      run_processes_parallel: preparing to run up to 1 tasks
  23:55:28.442504 run-command.c:1648      run_processes_parallel: done
  23:55:28.442536 run-command.c:663       trace: run_command: git gc --auto
  23:55:28.443983 git.c:439               trace: built-in: git gc --auto
  23:55:28.444903 run-command.c:663       trace: run_command: cd /home/vagrant/ELLIOTTCABLE/bs-sedlex/.git/modules/ppx-sedlex; unset GIT_PREFIX; GIT_DIR=. git fetch --no-prune --no-prune-tags --tags -v --recurse-submodules-default on-demand --submodule-prefix ppx-sedlex/ origin 0f509703fcd43ff4324d721a39220153bab49d4a
  23:55:28.446392 git.c:439               trace: built-in: git fetch --no-prune --no-prune-tags --tags -v --recurse-submodules-default on-demand --submodule-prefix ppx-sedlex/ origin 0f509703fcd43ff4324d721a39220153bab49d4a
  23:55:28.447105 run-command.c:663       trace: run_command: git-remote-https origin https://github.com/ELLIOTTCABLE/ppx-sedlex.git
  23:55:28.735871 run-command.c:663       trace: run_command: git fetch-pack --stateless-rpc --stdin --lock-pack --thin --no-progress https://github.com/ELLIOTTCABLE/ppx-sedlex.git/
  23:55:28.738885 git.c:439               trace: built-in: git fetch-pack --stateless-rpc --stdin --lock-pack --thin --no-progress https://github.com/ELLIOTTCABLE/ppx-sedlex.git/
  error: Server does not allow request for unadvertised object 0f509703fcd43ff4324d721a39220153bab49d4a
  </code></pre>
  
  <p>I can't make hide-nor-hair of why Git is requesting an "unadvertised object" here; but it's clearly not a GitHub problem, here — for some reason, the command:</p>
  
  <pre><code>git fetch --no-prune --no-prune-tags --tags -v \
     --recurse-submodules-default on-demand \ 
     --submodule-prefix ppx-sedlex/ \
     origin 0f509703fcd43ff4324d721a39220153bab49d4a
  </code></pre>
  
  <p>... is being automatically invoked upon the submodule, when I <code>git fetch</code> in the parent repo. (Again, that commit, <code>0f509703</code>, does not exist in either repo; again, the exact same repo, the exact same commit, and this isn't happening on macOS — only on Travis's Linux machines.)</p>