Gitlab 镜像仓库到GitHub上

技术渣 2022年10月22日

设置镜像仓库
打开设置 -> 仓库 -> 镜像仓库。
URL填写要镜像的仓库地址。格式如下:

https://<个人访问令牌>@github.com/<username>/<repo>.git

方向选择推送。
密码填写个人访问令牌即可。

遇到的问题:

  1. get remote references: create git ls-remote: exit status 128, stderr: "fatal: unable to access 'https://github.com/<username>/<repo>.git/': Empty reply from server\n".
    解决方法:
    关闭SSL认证,在托管Gitlab的机器上。
    git config --global http.sslVerify false