How can I use another user for the mirroring user

I have a mirroring setup with a local repo (Gitlab) and an external repo (on Github). The direction is “push”, so I have a special branch that each time I push to it, it mirrors its contents to the Github repository. Currently it shows in Github that the user who committed the changes is my user from Gitlab. What I want is to have it set for my Github user, so all the mirroring activity will be done on behalf of it. How can I do this? (I basically don’t want to show my local repo (Gitlab) user’s name on the external (Github) repo)

Mirroring does not rewrite the Git history, and as such, all commit authors remain the same. Technically it does

git clone
cd project

git remote add pushmirror

git push --all pushmirror

With subsequent tasks that pull/push. (simplified above for readability)

In order to filter user name / email addresses, you will need to rewrite the Git history before pushing to ´pushmirrorˋ remote.

Found these while searching for git rewrite history replace author committer which looks promising.

I’m not sure how much of an performance impact this will be when run on every sync. Suggest testing them while writing a script.

The script can be executed with pipeline schedules to trigger the sync. Scheduled pipelines | GitLab

I’m not aware of an option in pull/push mirroring. Suggest opening a feature proposal in case.

1 Like

Thanks, so the mirroring also pushing tags??? What if I don’t want that?