Vit*_*ing 3 migration git import github azure-devops
我尝试将存储库从 Visual Studio Team Service (VSTS) 迁移到 GitHub,只需转到加号 (+) 下拉框下的 Github。有“导入存储库”按钮。需要存储库克隆 URL 和凭据,它通常有效(例如 GitLab),但不适用于 VSTS。
仅显示此消息:“在 处未检测到源存储库。请检查 URL 并重试。”
如何从 VSTS 导入/迁移到 GitHub?
顺便说一句,VSTS 中启用了“启用备用身份验证凭据”。
我和你有同样的问题,所以我最终使用 Git 命令行导入它。
我按照https://help.github.com/articles/importing-a-git-repository-using-the-command-line/ 中复制的说明进行操作:
制作 repo 的“裸”克隆(用来自 VSTS 的克隆 URL 替换 URL):
git clone --bare https://external-host.com/extuser/repo.git
Run Code Online (Sandbox Code Playgroud)进入目录(用你的目录名替换 repo.git ):
cd repo.git
Run Code Online (Sandbox Code Playgroud)使用“镜像”选项推送克隆的仓库(将 URL 替换为您的 GitHub 仓库 URL):
git push --mirror https://github.com/ghuser/repo.git
Run Code Online (Sandbox Code Playgroud)删除临时本地存储库(将 repo.git 替换为您的目录名称):
cd ..
rm -rf repo.git
Run Code Online (Sandbox Code Playgroud)为我工作。