将所有 github 回购备份到 bitbucket

Backup all github repo to bitbucket

类似问题:Auto mirror all GitHub repository to gitlab

GitLab 支持拉镜像,这使得从 github 备份到 gitlab 变得更加容易。

bitbucket也支持镜像吗? 如果不是,“使用服务器推送更改”是从 github 备份所有 repo 的唯一方法吗?

does bitbucket support mirror also

据我所知没有拉取镜像,只有 smart mirror(在本地镜像远程存储库)

if not, is "using a server to push changes" the only way to backup all repo from github?

是的,除非是 GitHub 服务器,而不是您自己的服务器。
你可以使用 actions/mirroring-repository:

A GitHub Action for mirroring a repository to another repository on GitHub, GitLab, BitBucket, AWS CodeCommit, etc.

This will copy all commits, branches and tags.

例子,来自pixta-dev/repository-mirroring-action issue 3

# Deploy to BitBucket repos

name: Deploy to BitBucket Wordpress Repositories


# You may pin to the exact commit or the version.
# uses: pixta-dev/repository-mirroring-action@02f1627ade9e6b3b69e6a6d4fe8bc997474f48d1
# uses: pixta-dev/repository-mirroring-action@v1
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  deploy_to_test_repo:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - uses: actions/checkout@v1
      - uses: pixta-dev/repository-mirroring-action@v1
        with:
          target_repo_url:
            git@bitbucket.org:username/reponame.git
          ssh_private_key:
            ${{ secrets.BITBUCKET_SSH_PRIVATE_KEY }}

除非您需要 use an access key