Search code examples
gitgitlabmirroringgem-fury

How do I configure GitLab to mirror my repositories to Gemfury?


I use GitLab.com for my PHP repository management. However, I package my repositories for use with Composer. Right now, I'm using Satisfy to generate my packages, but this solution is not well developed, and has problems. I have decided to move to a commercial service, and GemFury seemed to be the best option.

I want to have GitLab mirror my repositories to GemFury, so that GemFury can generate a Composer-style repository automatically for me.

I attempted to use the Repository Mirroring settings in GitLab, but continually receive errors, of the form "fatal: remote error: Git repository not found". I understand what that means, but it is to be expected that the remote repository does not exist yet.

I feel that I must be missing something, but I'm not sure what it is.


Solution

  • Thanks to Iron Bishop, I was directed here: Message 'src refspec master does not match any' when pushing commits in Git

    The solution was to change my git push to explicitly push the master branch of HEAD. My .gitlab-ci.yml now looks like this...

    fury:
      script:
        - git remote add fury https://centralstationmarketing:[email protected]/centralstationmarketing/acela.git
        - git push --tags fury HEAD:master