1

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.

  • Welcome! Maybe you should use a Gitlab CI/CD Pipeline in order to manage the builds, instead of the mirror feature, since "is to be expected that the remote repository does not exist yet". – Iron Bishop Aug 20 '19 at 07:12
  • Thanks for the input. I've managed to set up a Gitlab CI, but I'm still seeing errors when it goes through the test phase... $ git remote add fury https://myuser:my-push-token@git.fury.io/myuser/my-repository-name.git $ git push --tags fury master error: src refspec master does not match any. error: failed to push some refs to 'https://myuser:my-push-token@git.fury.io/myuser/my-repository-name.git' If I connect to my development server, and run the same "git remote add" and "git push --tags fury master", all works as expected. I just can't get it working in CI. Any thoughts? – Jonathan Preston Aug 21 '19 at 22:12
  • did you already check this? https://stackoverflow.com/questions/4181861/message-src-refspec-master-does-not-match-any-when-pushing-commits-in-git – Iron Bishop Aug 22 '19 at 07:01
  • Thanks -- I somehow missed that when searching! – Jonathan Preston Aug 22 '19 at 15:49

1 Answers1

2

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:14SAHV-r9GN71uqsu3ayYLNSf3onhLbW4@git.fury.io/centralstationmarketing/acela.git
    - git push --tags fury HEAD:master