title: git push --mirror gives "failed to push some refs"
body: <p>I am trying to create a script that can mirror my git repository to another repository. Everything goes fine, but it it keeps saying </p>
  
  <pre><code>[remote rejected] refs/pull/xx/head -&gt; refs/pull/xx/head (The current action can only be performed by the system.)
  </code></pre>
  
  <p>The repository is cloned to a folder on my computer, and then pushed to another git. All files and history is cloned and pushed as it should, but this "error" keeps coming up. What can i do? </p>
  
  <p><a href="https://i.stack.imgur.com/tPPmO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tPPmO.png" alt="enter image description here"></a></p>
  
  <p>This is my script</p>
  
  <pre><code>git clone --mirror https://path1.com/_git/fredagsproject1
  cd fredagsproject1.git
  git remote set-url --push origin https://path2.com/_git/fredagsproject2
  git push --mirror
  </code></pre>