git-mirror-action
git-mirror-action copied to clipboard
Fail when use organization secret in workflow
Automatic mirror works when I use a secret stored in the source repo. But failed when I used a secret stored in organization. Here is my workflow .yml file:
jobs:
git-mirror:
runs-on: ubuntu-latest
steps:
- uses: wearerequired/git-mirror-action@v1
env:
SSH_PRIVATE_KEY: ${{ secrets.SYNC_REPO_PRIVATE_KEY }}
with:
source-repo: "[email protected]:source.git"
destination-repo: "[email protected]:destination.git"
I just met the same problem as you. I think this action used the default repo user (for an organization, the user is the org) to auth to github instead. Is there any way to designate authoring user?
@CharesFang The user should be always git
which is defined as part of the source/destination repo inputs.
@CharesFang The user should be always
git
which is defined as part of the source/destination repo inputs.
Thanks for your reply! I'm trying to find out the bugs.
This works.
jobs:
git-mirror:
runs-on: ubuntu-latest
steps:
- uses: wearerequired/git-mirror-action@v1
env:
SSH_PRIVATE_KEY: ${{ secrets.SYNC_REPO_PRIVATE_KEY }}
with:
source-repo: "https://github.com/source.git"
destination-repo: "[email protected]:destination.git"
This works.
jobs: git-mirror: runs-on: ubuntu-latest steps: - uses: wearerequired/git-mirror-action@v1 env: SSH_PRIVATE_KEY: ${{ secrets.SYNC_REPO_PRIVATE_KEY }} with: source-repo: "https://github.com/source.git" destination-repo: "[email protected]:destination.git"
Thanks a lot! I have just fix my bugs. I made some mistakes in ssh key configurations. Thank you all guys!