[英]What is the fastest way to transfer all of my GitHub repositories to GitLab?
I'm looking to move entirely away from GitHub to GitLab as easily as possible.我希望尽可能轻松地完全从 GitHub 转移到 GitLab。
You can import your GitHub projects into GitLab. 您可以将GitHub项目导入GitLab。 If you already have a gitlab account, just go to new (+) --> project --> import --> github.
如果你已经有一个gitlab帐户,只需转到新的(+) - >项目 - >导入 - > github。 More info in: https://gitlab.com/import/github/new
更多信息: https : //gitlab.com/import/github/new
In GitLab, choose to create a new project, then go to the Import project tab (instead of the default Blank project ). 在GitLab中,选择创建一个新项目,然后转到Import project选项卡(而不是默认的Blank项目 )。 From th e list of available platforms to automatically import from, select the second option GitHub .
从要自动导入的可用平台列表中,选择第二个选项GitHub 。
You will now need to give GitLab a personal access token that you initiate from GitHub. 您现在需要为GitLab提供一个您从GitHub发起的个人访问令牌。 Login to GitHub and navigate to your per sonal settings.
登录GitHub并导航到您的个人设置。 From there, select Developer settings , then Personal access tokens , then click Generate new token .
从那里,选择开发人员设置 ,然后选择个人访问令牌 ,然后单击生成新令牌 。 Complete the form that you are prompted with;
填写提示您的表单; the repo scope setting is sufficient for basic transferring.
回购范围设置足以进行基本传输。 Be sure to copy the token to your clipboard when finished.
完成后,请务必将令牌复制到剪贴板。
Paste your personal access token into GitLab, then click List your GitHub repositories . 将您的个人访问令牌粘贴到GitLab中,然后单击列出您的GitHub存储库 。
On the rightmost column with the header Status , choose to import all projects that you would like. 在标题为“ 状态”的最右侧列上,选择导入您想要的所有项目。 If you would like to import all repositories at the same time, you can select the green button Import all repositories at the top.
如果要同时导入所有存储库,可以选择顶部的绿色按钮导入所有存储库 。
For more information, please refer to the detailed post by GitLab on the topic by clicking on the image or link below: 有关详细信息,请单击下面的图像或链接,参阅GitLab关于该主题的详细信息:
https://docs.gitlab.com/ee/user/project/import/github.html https://docs.gitlab.com/ee/user/project/import/github.html
只需在本地存储库中添加一个GitLab repo作为另一个远程仓库并推送到它。
Please follow this, i think this will be helpful for you. 请关注此,我认为这对您有所帮助。 1. Create a project repository in gitlab.
1.在gitlab中创建项目存储库。 2. Then your existing project repository added another remote url.(git remote add 'name' 'new repository') 3. And Then push your project to that remote url.
2.然后您现有的项目存储库添加了另一个远程URL。(git remote add'name''new repository')3。然后将您的项目推送到该远程URL。 (git push 'name' master.)
(git push'name'master。)
Note that GitLab 14.10 (April 2022) does simplify the process:请注意, GitLab 14.10 (2022 年 4 月)确实简化了流程:
Importing from GitHub defaults to the current group path
从GitHub导入默认为当前组路径
When importing from GitHub, this milestone changes the default destination for imported projects to the contextual namespace of the GitLab group from which you started the import.
当从 GitHub 导入时,此里程碑将导入项目的默认目标更改为开始导入的 GitLab 组的上下文命名空间。
Previously, GitHub projects imported to your personal namespace.
以前,GitHub 个项目导入到您的个人命名空间。
This usability enhancement helps users import projects in a more intuitive way and doesn't place imported projects in confusing locations.
这种可用性增强可帮助用户以更直观的方式导入项目,并且不会将导入的项目放在混乱的位置。
See Documentation and Issue .
请参阅文档和问题。
And it comes with:它带有:
View history of all project imports on a single page
在单个页面上查看所有项目导入的历史记录
The new Project import history page lists all project imports, regardless of where they were imported from.
新的项目导入历史页面列出了所有项目导入,无论它们是从哪里导入的。 This view consolidates information that was previously scattered on the import pages of each individual importer.
此视图整合了以前分散在每个单独进口商的进口页面上的信息。
Having all the details about previous imports in one view gives you a single place to find and review the status of all previous imports.
在一个视图中包含有关先前导入的所有详细信息,使您可以在一个地方查找和查看所有先前导入的状态。 This includes details on imports that failed, so that you can verify that you successfully imported all the intended projects.
这包括有关导入失败的详细信息,以便您可以验证是否已成功导入所有预期项目。
See Documentation and Issue .
请参阅文档和问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.