Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Sync Git Repo across Cloud Provider ====== Based on this [[https://medium.com/@dmitryshaposhnik/sync-bitbucket-repo-to-github-669458ea9a5e|article]]. Updated with latest Github requirement of key pair. ===== On Github Side ===== - Create repo designated as mirror of Bitbucket - Create ssh-ed25519 Keypair for that account, see [[git:start#using_git_with_ssh_connection|here]] - Hold the private and public ready ===== On Bitbucket Side ===== - Login as Repo Administrator, not just collaborator. - Open the Repository Settings > Settings menu for the given repo. - Enable pipeline for this repository - Open the Repository Settings > SSH Keys - Click "Use my own key" - Put the public and private key of the Github repo account that was created above. - On the Known Host section, enter github.com, then click Fetch. After the site fingerprint fetched, click Add ===== Bitbucket Pipeline configuration ===== Use the following example as template. Edit the repo name accordingly. <code> clone: depth: full pipelines: default: - step: script: - git push --mirror git@github.com:semaidevadmin/semai-pro-kuasa-api.git </code> This will push the changes to the designated Github target. It connects using SSH, with the private key of Github account. git/cloud-repo-sync.txt Last modified: 2022/06/22 22:46by jmerari