Fix bug when project export to remote url fails Closes #60827 See merge request gitlab-org/gitlab-ce!27614