Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem using different branches #7

Closed
ffscalco opened this issue Feb 11, 2020 · 2 comments · Fixed by #9
Closed

Problem using different branches #7

ffscalco opened this issue Feb 11, 2020 · 2 comments · Fixed by #9
Labels
bug Something isn't working

Comments

@ffscalco
Copy link

This is my current configuration:

name: Mirroring repository

on:
  push:
    branches:
      - master
      - staging

jobs:
  sync_repos:
    runs-on: ubuntu-18.04
    steps:
    - name: repo-sync
      uses: wei/git-sync@v1.1.2
      env:
        SOURCE_REPO: <secret_source_repo>
        DESTINATION_REPO:  <secret_destination_repo>
        SSH_PRIVATE_KEY:  <secret_private_key>
      with:
        args: $SOURCE_REPO ${GITHUB_REF##*/} $DESTINATION_REPO ${GITHUB_REF##*/}

This works perfectly when I push to master branch, however, for any other branches it always gives me the following error, It doesn't matter if I have created the new branch in the other repo or not.

error: src refspec staging does not match any error: failed to push some refs to 'git@github.com:***.git'

Any thoughts?

@rigplan
Copy link

rigplan commented Feb 24, 2020

I'm having the same problem.

wei added a commit that referenced this issue Apr 18, 2020
@wei wei closed this as completed in #9 Apr 18, 2020
wei added a commit that referenced this issue Apr 18, 2020
@wei wei added the bug Something isn't working label Apr 18, 2020
@wei
Copy link
Owner

wei commented Apr 18, 2020

@ffscalco @rigplan Thanks for the report.
It's been fixed in wei/git-sync@v1.1.3 and wei/git-sync@v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants