Skip to content

Mirroring repositories doesn't work: 2:Fetching remote upstream failed

Problem to solve

The behavior of Git changed in 2.20.0, which now causes mirroring to fail if tags have diverged:

* The rules used by "git push" and "git fetch" to determine if a ref
   can or cannot be updated were inconsistent; specifically, fetching
   to update existing tags were allowed even though tags are supposed
   to be unmoving anchoring points.  "git fetch" was taught to forbid
   updates to existing tags without the "--force" option.

We have received multiple reports related to Mirror repository functionality not working properly.

Similar to https://gitlab.com/gitlab-org/gitlab-ce/issues/55729

Further details

We currently have an option to force mirror changes from upstream, or allow branches to diverge. We should allow similar behavior for tags.

Proposal

  • Change Overwrite diverged branches button to Overwrite diverged branches and tags
  • if this button is checked, then we will use --force to overwrite tags if the tags have been modified in the remote

Links / references

Customer Reports:

Edited by James Ramsay (ex-GitLab)