我刚刚在我的虚拟机上安装了ubuntu服务器18.04并设置了Gitlab。我在使用DNS时遇到问题,并使用IP地址连接到它。
我在GitLab CI Runner上遇到问题->我遇到了错误fatal: repository 'http://gitlab.dev.pl/user/repo-name.git/' not found
我从服务器及其外部克隆并推送到git都没问题。
整个作业日志:
Running with gitlab-runner 13.1.1 (6fbc7474)
on things-keeper-runner _VcemHSn
Preparing the "docker" executor
Using Docker executor with image mcr.microsoft.com/dotnet/core/sdk:3.1 ...
Pulling docker image mcr.microsoft.com/dotnet/core/sdk:3.1 ...
Using docker image sha256:006ded9ddf293ffe62ff192776bcb783199ca608405983cf53e2ea8099d3d786 for mcr.microsoft.com/dotnet/core/sdk:3.1 ...
Preparing environment
00:02
Running on runner-vcemhsn-project-1-concurrent-0 via dev_server...
Getting source from Git repository
00:02
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/user/repo-name/.git/
fatal: repository 'http://gitlab.dev.pl/user/repo-name.git/' not found
ERROR: Job failed: exit code 1
我的.gitlab-ci.yml
image: mcr.microsoft.com/dotnet/core/sdk:3.1
stages:
- build
- test
before_script:
- "cd src"
- "dotnet restore"
build:
stage: build
script:
- "dotnet build"
test:
stage: test
script:
- "cd .."
- "dotnet test"
可能是Runner无法正确解析git.dev.pl。我可以以某种方式检查它还是通过IP地址? 您能帮我解决我的问题吗?
答案 0 :(得分:0)
答案 1 :(得分:0)
感谢文档benji-over-9000-benchonaut,前提是我能够解决此问题。
我需要在/etc/gitlab-runner/config.toml中添加一行
clone_ulr = "http//192.168.0.32/"