GitLab有一个镜像功能:
从GitLab中。
如果我指定目标URL
但是那并没有帮助。
b) 我需要使用“手动输入主机密钥”吗?应该指定什么?我尝试使用
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s
来自于
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
以及使用SSH公钥
作为身份验证方法。
然而,我遇到了一个错误。
Remote mirrors url is blocked: URI is invalid
从GitLab中。
如果我指定目标URL
https://github.com/stefaneidelloth/mirror_demo.git
我无法选择“SSH公钥”作为认证方式。
=> 如何在没有GitLab的高级版的情况下将GitLab项目镜像到GitHub项目的正确设置是什么?
编辑
第二个:
需要替换为/
。
由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".
a) 我需要指定一个与22不同的端口吗?如何操作?我已经尝试过了
ssh://git@github.com:443/stefaneidelloth/mirror_demo.git
但是那并没有帮助。
b) 我需要使用“手动输入主机密钥”吗?应该指定什么?我尝试使用
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s
来自于
但是那并没有起到帮助的作用。
c) 我还尝试在用户设置中生成GitHub AccessToken 并将其应用于GitLab镜像设置的密码选项。我尝试了https://
和git://
的URL,但都没有成功。