2016-04-16 9 views
9

私はGitlab CIを初めて使いましたが、しばらくトピックを読んでいます。
すべてのコミット後に自分のGitlabでC#-Projectsをテストコンパイルする必要があります。プロジェクトを正しくビルドするために、Windows Shell-RunnerセットアップをCIで使用する必要があることがわかりました。Windows上のGitlab Build RunnerはSSHの代わりにHTTPを使用します

残念ながら、私のGitlabセットアップでは、開発者とマシンだけがHTTPではなくSSH経由で接続できます。しかし、私のWindowsランナーは常にhttpを介して接続しようとし、ビルドに失敗します。

正しく設定するにはどうすればよいですか?
ランナーに関連付けられたconfig.tomlを編集しようとしましたが、sshとhttpのどちらを使用するかを指定するオプションはありません。

答えて

0

ランナーがsshからアクセスできる場合は、gitlab-runner registerコマンドでランナーにアクセスしてください。 クリスチャンStankowicから
を参照してください "GitLab Continuous Integration":適切なコンテンツ、including an ssh configconfig.tomlファイルを生成するに役立つだろう

# 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! 

+0

返信いただきありがとうございます@VonC!残念ながら、私はcmdまたはPowershellを介してのみランナーにアクセスできます。 – Flash1232