我正在尝试部署到每次提交后发生的另一个内部服务器。我尝试了这里提到的步骤,但它们不适合我:Deploy every build to a server using Gitlab CI
我收到以下错误消息:
gitlab-ci-multi-runner 1.2.0(3a4fcd4)
使用SSH执行程序......
错误:构建失败:在[:: 1]上拨打tcp:lookup $ {MY_INTERNAL_PROJECTS_SERVER}:53:读取udp [:: 1]:52735-&gt; [:: 1]:53:读取:连接被拒绝< / p>
/etc/gitlab-runner/config.toml:
concurrent = 2
[[runners]]
name = "deploy_on_projects_server"
limit = 1
url = "https://${MY_INTERNAL_GITLAB_SERVER}/ci"
token = "701299841717071d3abfb45d91a56a"
executor = "ssh"
builds_dir = "/home/${USER}/test"
[runners.ssh]
user = "${USER}"
password = "${PASSWORD}"
host = "${MY_INTERNAL_PROJECTS_SERVER}"
port = "22"
identity_file = "/home/gitlab-runner/.ssh/id_rsa"
[runners.cache]
Insecure = false
.gitlab-ci.yml
build:
tags: ["deploy_on_projects_server"]
script:
- echo "build"
在我的gitlab服务器上,我将用户更改为gitlab-runner并成功使用ssh登录到我的项目服务器。所以这很好。
有谁知道我做错了什么或我如何满足我的需要?