Can't resolve host when pull repo
Hello, I'm super new to gitlab-runner, And here is some wired issue:
- Using local DNS for local record, Using DHCP And
docker --dns
to make sure using local DNS - Using docker run gitlab and runner
- Runner register by hostname, And working find, Runner can obtain jobs
- Gitlab http bind on 8081 port, Using nginx for vhost proxy
- I can access gitlab by hostname, vhost is working fine
I got this error:
Getting source from Git repository
00:01
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/alceatraz/runner-test/.git/
fatal: unable to access 'http://git.btstudio.local/alceatraz/runner-test.git/': Could not resolve host: git.btstudio.local
ERROR: Job failed: exit code 1
So I check runner's resvolce.conf, It's using my local DNS
- I can ping hostname in runner docker (
docker exec -it runner bash
) - I write hosts to make sure not DNS error, Not working
- I write
clone_url
withhttp://ip:port/
, Not working - Even there is no any hostname in runner config, Runner still pull with hostname
I have read #305 (closed) #6644 #3886 none of them working on me server. But I don't think change gitlab external url
is an solution, Because I can access web page and register runner.
Edited by Alceatraz Warprays