GitLab 有镜像功能:
https://docs.gitlab.com/ee/user/project/repository/mirror/
并且GitHub不支持简单的密码认证。我试着跟随
https://meesvandongen.nl/posts/mirror-gitlab-github
使用目标网址
ssh://git@github.com:stefaneidelloth/mirror_demo.git
Run Code Online (Sandbox Code Playgroud)
并SSH public key作为身份验证方法。
但是,我收到错误
Remote mirrors url is blocked: URI is invalid
Run Code Online (Sandbox Code Playgroud)
来自亚搏体育实验室。
如果我指定目标网址
https://github.com/stefaneidelloth/mirror_demo.git
Run Code Online (Sandbox Code Playgroud)
我无法选择SSH public key身份验证方法。
=> 将 GitLab 项目镜像到 GitHub 项目(没有 GitLab PREMIUM 版本)的正确设置是什么?
编辑
第二个:需要替换为/.
GitHub 推荐:
添加ssh://前缀是不够的。
错误的:ssh://git@github.com:stefaneidelloth/mirror_demo.git
github.com后仍需更换::
正确的:ssh://git@github.com/stefaneidelloth/mirror_demo.git
然后GitLab生成连接的SSH密钥,需要将其复制到GitHub项目设置(而不是用户设置),请参阅https://meesvandongen.nl/posts/mirror-gitlab-github
现在我收到下一个错误:
13:get remote references: create git ls-remote: exit status 128, stderr: "ssh connect to host github.com port 22: Connection timed out\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n".
Run Code Online (Sandbox Code Playgroud)
a)我是否需要指定 22 以外的端口?如何?我试过
ssh://git@github.com:443/stefaneidelloth/mirror_demo.git
Run Code Online (Sandbox Code Playgroud)
但这没有帮助。
b)我需要使用“手动输入主机密钥”吗?应该具体说明什么?我尝试使用
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s
从
但这没有帮助。
c)我还尝试在用户设置中生成 GitHub AccessToken并将其应用于 GitLab 镜像设置的密码选项。我都试过了,https://还有git://网址。没有成功。
毕竟我让这个工作了。
ssh://git@github.com/stefaneidelloth/mirror_demo.git| 归档时间: |
|
| 查看次数: |
1199 次 |
| 最近记录: |