将所有 github 仓库备份到 bitbucket

问题描述

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

GitLab 支持 pull mirror,这使得从 github 备份到 gitlab 变得更加容易。

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

解决方法

bitbucket 是否也支持镜像

我所知道的没有 pull mirror,只有 smart mirror(本地镜像远程仓库)

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

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

用于将存储库镜像到 GitHub、GitLab、BitBucket、AWS CodeCommit 等上的另一个存储库的 GitHub 操作。

这将复制所有提交、分支和标签。

示例,来自 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

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...