首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >将所有github回购备份到bitbucket

将所有github回购备份到bitbucket
EN

Stack Overflow用户
提问于 2021-07-20 12:46:01
回答 1查看 626关注 0票数 1

类似问题:自动镜像所有GitHub存储库到gitlab

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

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-07-26 20:24:52

bitbucket支持镜像吗?

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

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

是的,但它将是GitHub服务器,而不是您自己的服务器。

你可以用actions/mirroring-repository

一个GitHub操作,用于将存储库镜像到GitHub、GitLab、BitBucket、AWS CodeCommit等上的另一个存储库。 这将复制所有提交、分支和标记。

示例,来自问题3

代码语言:javascript
运行
复制
# 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 }}

除了你需要使用访问密钥

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68455128

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档