Recently we wanted to create a yocto cgit repository mirror onto our GitHub which should track our changes as well as Yocto git, follow below steps to create a mirror on GitHub, This assumes, we are cloning into poky-mirror directory on our local machine ~/Desktop/devlab/yocto and we have create a new repository named “poky” into our github account. $ cd ~/Desktop/devlab/yocto $ git clone --mirror git://git.yoctoproject.org/poky poky-mirror $ cd poky-mirror/ $ git remote set-url --push origin https://github.com/lynxbee/poky $ git push --mirror With this, you should see a git like https://github.com/lynxbee/poky onto your github . Replace URLs as per your need.

Execution & Command Syntax

Terminalbash
git repository mirror onto our GitHub which should track our changes as well as Yocto git, follow below steps to create a mirror on GitHub, This assumes, we are cloning into poky-mirror directory on our local machine ~/Desktop/devlab/yocto and we have create a new repository named “poky” into our github account
Terminalbash
git clone --mirror git://git
Terminalbash
git remote set-url --push origin https://github

Technical Implementation Details

Reference : github help

Gotchas and Common Issues

  • Permission Verification - confirm execution permissions and path variables before invoking system binaries.

  • Version Compatibility - check software version release notes for deprecated flags or syntax changes.

  • Log Monitoring - inspect system logs (journalctl or /var/log) to troubleshoot execution failures.

Following these steps ensures clean configuration, proper security boundaries, and reliable execution for create repository mirror onto github.