GitLab支持拉镜像,这使得从github到gitlab的备份更加容易。
bitbucket也支持镜像吗?如果不是,“使用服务器推送更改”是从github备份所有回购的唯一方法吗?
发布于 2021-07-26 20:24:52
bitbucket支持镜像吗?
据我所知,没有拉镜,只有智能镜 (在本地镜像远程存储库)
如果不是,“使用服务器推送更改”是从github备份所有回购的唯一方法吗?
是的,但它将是GitHub服务器,而不是您自己的服务器。
你可以用actions/mirroring-repository
一个GitHub操作,用于将存储库镜像到GitHub、GitLab、BitBucket、AWS CodeCommit等上的另一个存储库。 这将复制所有提交、分支和标记。
示例,来自问题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 }}
除了你需要使用访问密钥。
https://stackoverflow.com/questions/68455128
复制相似问题