简体   繁体   English

使用Gitlab CE的本地VM上的Gitlab Runner无法克隆存储库

[英]Gitlab Runner on local VM with Gitlab CE cannot clone repo

I have a linux virtual box with a Gitlab CE server. 我有一个带有Gitlab CE服务器的linux虚拟机。 I tried to configure a runner so I can use CI/CD, but it failed to git clone. 我尝试配置运行程序,以便可以使用CI / CD,但无法进行git clone。

Here the output from the job 这是工作的输出

  • ... ...
  • Couldn't find host "my_git_adress".org in the .netrc file; .netrc文件中找不到主机“ my_git_adress” .org; using defaults 使用默认值
  • Trying "My public internet ip"... 尝试“我的公共互联网IP” ...
  • TCP_NODELAY set TCP_NODELAY设置
  • connect to "My public internet ip" port 80 failed: Operation timed out 连接到“我的公共Internet IP”端口80失败:操作超时
  • Failed to connect to "my_git_adress".org port 80: Operation timed out 无法连接到“ my_git_adress” .org端口80:操作超时
  • Closing connection 0 fatal: unable to access ' http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@ "my_git_adress".org/"my_project".git/': Failed to connect to "my_git_adress".org port 80: Operation timed out Debug: Remote helper quit. 关闭连接0致命:无法访问' http:// gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx @ “ my_git_adress” .org /“ my_project” .git /':无法连接到“ my_git_adress” .org端口80:操作超时调试:退出远程帮助程序。 ERROR: Job failed: exit code 1 错误:作业失败:退出代码1

EDIT: It appears that when the runner is on the same OS/device of the Gitlab server and when it is on another device on the same local network it fails. 编辑:看来,当运行程序在Gitlab服务器的同一OS /设备上并且在同一本地网络上的另一设备上时,它就会失败。 But when it is on different networks connected to internet it works (but it gets stuck on next steps may be because our bad connection). 但是,当它位于连接到Internet的不同网络上时,它就可以工作(但由于下一步连接不良,它可能会卡在下一步中)。

Seems like a routing issue between your runner and your gitlab instance: 似乎在跑步者和gitlab实例之间存在路由问题:

connect to "My public internet ip" port 80 failed: Operation timed out 连接到“我的公共Internet IP”端口80失败:操作超时

I suggest you login to your runner and try something like this: 我建议您登录跑步者并尝试如下操作:

curl "http://my internet ip"

If that doesn't work you have a routing issue. 如果这样不起作用,则可能是路由问题。 We'd need to know more about your network setup to be able to help further. 我们需要更多地了解您的网络设置,以便能够进一步提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM