2016-04-16 37 views
9

我是Gitlab CI的新手,但現在一直在閱讀該主題。
我必須在每次提交後在我的Gitlab上測試編譯C#項目,並發現我需要使用CI的Windows Shell-Runner設置才能正確構建項目。Windows上的Gitlab Build Runner使用HTTP而不是SSH

不幸的是,我的Gitlab安裝程序只允許開發人員和機器通過SSH連接,而不是HTTP。但是我的Windows跑步者總是試圖通過http進行連接,並且失敗了構建。

如何正確配置它?
我已經嘗試編輯與跑步者相關的config.toml,但沒有選項可以指定是否使用ssh或http。

回答

0

如果您的跑步者可以通過ssh訪問,請嘗試使用gitlab-runner register命令進行註冊。
見 「GitLab Continuous Integration」 從基督教Stankowic

# sudo gitlab-runner register 
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci): 
http://gitlab.localdomain.loc/ci 
Please enter the gitlab-ci token for this runner: 
xxx 
Please enter the gitlab-ci description for this runner: 
[gitlab.localdomain.loc]: 
Please enter the gitlab-ci tags for this runner (comma separated): 
rpm764,generic 
INFO[0035] 7ab95543 Registering runner... succeeded 
Please enter the executor: ssh, shell, parallels, docker, docker-ssh: 
ssh 
Please enter the SSH server address (eg. my.server.com): 
gitlab.localdomain.loc 
Please enter the SSH server port (eg. 22): 
22 
Please enter the SSH user (eg. root): 
su-gitlab-ci 
Please enter the SSH password (eg. docker.io): 
myPassword 
Please enter path to SSH identity file (eg. /home/user/.ssh/id_rsa): 
/home/su-gitlab-ci/.ssh/id_rsa 
INFO[0143] Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! 

這將有助於產生config.toml文件與正確的內容,including an ssh config

+0

感謝您的回覆@VonC!不幸的是,我只能通過cmd或Powershell訪問跑步者。 – Flash1232