Synchronizing GitHub with Adobe Cloud Manager Repository
I am trying to automatically synchronize my GitHub repository with the Adobe Cloud Manager Git repository, so that my Cloud Manager pipeline always has the latest source code. I created a GitHub Action to push changes from main, develop, and other branches whenever there’s a commit. However, my push keeps failing with the error:
remote: pre-receive hook declined
remote: You are not allowed to update refs/heads/develop
Here’s the GitHub Action I am using:
name: Mirror to Adobe Cloud Manager
on:
push:
branches:
- main
- develop
workflow_dispatch:
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.AEM_CLOUD_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan git.cloudmanager.adobe.com >> ~/.ssh/known_hosts
- name: Add Adobe remote
run: |
git remote add adobe ${{ secrets.AEM_CLOUD_REPO_URL }}
- name: Push changes
run: |
git push --mirror adobe
When I run this, the pipeline fails at the last step. I also have multiple branches like develop/develop and develop/qa. Could this be the issue? Is --mirror the wrong approach when pushing to Cloud Manager? How should I correctly push my branches and tags from GitHub to the Adobe repository?