{"id":246,"date":"2014-02-24T21:55:55","date_gmt":"2014-02-24T12:55:55","guid":{"rendered":"http:\/\/www.dracula.mydns.jp\/blog\/?p=246"},"modified":"2014-09-21T11:07:42","modified_gmt":"2014-09-21T02:07:42","slug":"gitlabjenkins%e3%81%a7%e8%b6%85%e3%83%8f%e3%83%9e%e3%81%a3%e3%81%9f","status":"publish","type":"post","link":"https:\/\/www.dracula.mydns.jp\/blog\/?p=246","title":{"rendered":"GitLab+Jenkins\u3067\u8d85\u30cf\u30de\u3063\u305f"},"content":{"rendered":"<p>\u81ea\u5b85\u306bGitLab\u3068Jenkins\u3092\u69cb\u7bc9\u3057\u305f\u3093\u3067\u3059\u304c\u3001\u8d85\u30cf\u30de\u308a\u307e\u3057\u305f\u3002<br \/>\n\u30b0\u30b0\u3063\u3066\u3082\u306a\u304b\u306a\u304b\u305d\u306e\u3082\u306e\u30ba\u30d0\u30ea\u306e\u89e3\u304c\u898b\u3064\u304b\u3089\u305a\u304b\u306a\u308a\u60a9\u3093\u3060\u306e\u3067<br \/>\n\u540c\u3058\u554f\u984c\u3067\u8e93\u3044\u305f\u8ab0\u304b\u306e\u4e00\u52a9\u306b\u306a\u308c\u3070\u5e78\u3044\u3060\u3068\u601d\u3044\u3053\u3053\u306b\u8a18\u9332\u3092\u306e\u3053\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>GitLab\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f6.4.2\u3067\u3059\u3002Gitolite\u306f\u4f7f\u308f\u305a\u306bGitLab Shell\u306e1.7.9\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\njenkins\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u4eca\u56de\u3042\u307e\u308a\u91cd\u8981\u3067\u306f\u306a\u304b\u3063\u305f\u306e\u3067\u9069\u5f53\u306b\u3002<br \/>\n\u69cb\u7bc9\u306e\u624b\u9806\u306a\u3069\u306f\u30b0\u30b0\u308c\u3070\u51fa\u3066\u304f\u308b\u306e\u3067\u7701\u7565\u3057\u307e\u3059\u304cGitLab\u3068jenkins\u3092\u540c\u3058\u30b5\u30fc\u30d0\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u4e00\u901a\u308a\u69cb\u7bc9\u304c\u7d42\u308f\u3063\u3066\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092GitLab\u306b\u767b\u9332\u3057\u3066\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u30bd\u30fc\u30b9\u306e\u30b3\u30df\u30c3\u30c8\u3084\u30d7\u30c3\u30b7\u30e5\u304c\u3067\u304d\u308b\u306e\u3092\u78ba\u8a8d\u3057\u7d42\u3048\u3066jenkins\u3067\u30d3\u30eb\u30c9\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u3068\u3053\u304b\u3089\u3002<\/p>\n<p>\u79d8\u5bc6\u9375\u3092\u4f7f\u3063\u3066SSH\u306b\u3088\u308b\u63a5\u7d9a\u3092\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u3092\u3057\u307e\u3057\u305f\u3002<br \/>\n\u4f0f\u5b57\u3067\u3059\u3051\u3069\u3053\u3093\u306a\u611f\u3058\u3002<br \/>\n<a href=\"https:\/\/www.dracula.mydns.jp\/blog\/wp-content\/uploads\/2014\/09\/jenkins.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dracula.mydns.jp\/blog\/wp-content\/uploads\/2014\/09\/jenkins.png\" alt=\"jenkins\" width=\"719\" height=\"261\" class=\"alignnone size-full wp-image-323\" \/><\/a><\/p>\n<p>GitLab\u306b\u306f\u516c\u958b\u9375\u3092\u767b\u9332\u3057\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u307e\u3067\u3084\u3063\u3066Jenkins\u3067\u30d3\u30eb\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3053\u3093\u306a\u30a8\u30e9\u30fc\u304c\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nFetching changes from the remote Git repository\r\nFetching upstream changes from xxx@\u30b5\u30fc\u30d0:\u30e6\u30fc\u30b6\/\u30d7\u30ed\u30b8\u30a7\u30af\u30c8.git\r\nusing GIT_SSH to set credentials \r\nFATAL: Failed to fetch from xxx@\u30b5\u30fc\u30d0:\u30e6\u30fc\u30b6\/\u30d7\u30ed\u30b8\u30a7\u30af\u30c8.git\r\nhudson.plugins.git.GitException: Failed to fetch from xxx@\u30b5\u30fc\u30d0:\u30e6\u30fc\u30b6\/\u30d7\u30ed\u30b8\u30a7\u30af\u30c8.git\r\n\tat hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:623)\r\n\tat hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:855)\r\n\tat hudson.plugins.git.GitSCM.checkout(GitSCM.java:880)\r\n\tat hudson.model.AbstractProject.checkout(AbstractProject.java:1411)\r\n\tat hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:651)\r\n\tat jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)\r\n\tat hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:560)\r\n\tat hudson.model.Run.execute(Run.java:1670)\r\n\tat hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)\r\n\tat hudson.model.ResourceController.execute(ResourceController.java:88)\r\n\tat hudson.model.Executor.run(Executor.java:231)\r\nCaused by: hudson.plugins.git.GitException: Command &quot;git fetch --tags --progress \r\nxxx@\u30b5\u30fc\u30d0:\u30e6\u30fc\u30b6\/\u30d7\u30ed\u30b8\u30a7\u30af\u30c8.git +refs\/heads\/*:refs\/remotes\/origin\/*&quot; \r\nreturned status code 128:\r\nstdout: \r\nstderr: Access denied.\r\nfatal: Could not read from remote repository.\r\n\r\nPlease make sure you have the correct access rights\r\nand the repository exists.\r\n<\/pre>\n<p>\u305d\u308c\u3067\uff11\uff19\u884c\u76ee\u306b\u51fa\u3066\u3044\u308b\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9\uff11\uff12\uff18\u3067\u3044\u308d\u3044\u308d\u8abf\u3079\u3066\u307f\u305f\u3093\u3060\u304c\u3001<br \/>\n\u3053\u308c\u304c\u539f\u56e0\u304c\u3044\u308d\u3044\u308d\u3042\u308a\u3059\u304e\u3066\u306a\u304b\u306a\u304b\u5206\u304b\u3089\u306a\u3044\u3002<\/p>\n<p>SSHKey\u3092\u4f5c\u308a\u306a\u304a\u3057\u3066\u518d\u767b\u9332\u3057\u305f\u308a\u3001\u30e6\u30fc\u30b6\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u3092\u898b\u76f4\u3057\u305f\u308a\u3001restorecon\u3092\u6253\u3063\u3066\u307f\u305f\u308a\u3068\u3046\u3093\u3046\u3093\u6570\u6642\u9593\u3042\u308c\u3084\u3053\u308c\u3084\u3068\u8a66\u884c\u932f\u8aa4\u3002\u5927\u4f53\u306b\u304a\u3044\u3066\u3053\u3046\u3044\u3046\u3068\u304d\u306f\u4f55\u3092\u3084\u3063\u3066\u3082\u4e0a\u624b\u304f\u3044\u304b\u306a\u3044\u3082\u3093\u3067\u4e00\u5411\u306b\u89e3\u6c7a\u3057\u306a\u3044\u306e\u3067\u3061\u3087\u3063\u3068\u30b2\u30fc\u30e0\u3067\u3082\u3057\u3066\u6c17\u5206\u8ee2\u63db\u3092\u3057\u305f\u3068\u3053\u308d\u306f\u3063\u3068\u3072\u3089\u3081\u3044\u305f\u3002<\/p>\n<p>\u7d50\u8ad6\u3068\u3057\u3066\u306fgitlab-shell\u306e\u8a2d\u5b9a\u304c\u30c0\u30e1\u3060\u3063\u305f\u3002<\/p>\n<pre class=\"brush: text; highlight: [5]\"   title=\"\u30c0\u30e1\u3060\u3063\u305f\u3068\u304d\u306e\/home\/git\/gitlab-shell\/config.yml\" >\r\n# GitLab user. git by default\r\nuser: git\r\n\r\n# Url to gitlab instance. Used for api calls. Should end with a slash.\r\ngitlab_url: \"http:\/\/127.0.0.1:80\/\"\r\n<\/pre>\n<pre class=\"brush: text; highlight: [5]\"   title=\"\u4fee\u6b63\u5f8c\u306e\/home\/git\/gitlab-shell\/config.yml\" >\r\n# GitLab user. git by default\r\nuser: git\r\n\r\n# Url to gitlab instance. Used for api calls. Should end with a slash.\r\ngitlab_url: \"http:\/\/127.0.0.1:8080\/\"\r\n<\/pre>\n<p>\u4f55\u306e\u3053\u3068\u306f\u306a\u3044\u3002\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u304b\u30898080\u756a\u306b\u98db\u3070\u3059\u305f\u3081\u306b\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u5909\u3048\u3066\u3044\u305f\u306e\u306bGitLab Shell\u306e\u5bfe\u5fdc\u3092\u3057\u3066\u306a\u304b\u3063\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3057\u305f\u3002\u5225PC\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u3057\u3066\u3057\u304b\u4f7f\u3063\u3066\u306a\u304b\u3063\u305f\u306e\u3067\u306a\u304b\u306a\u304b\u6c17\u3065\u3051\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u3057\u304b\u3057\u3082\u3046\u3061\u3087\u3063\u3068\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u5206\u304b\u308a\u6613\u304f\u3067\u304d\u305d\u3046\u306a\u3082\u306e\u3067\u3059\u3051\u3069\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u5b85\u306bGitLab\u3068Jenkins\u3092\u69cb\u7bc9\u3057\u305f\u3093\u3067\u3059\u304c\u3001\u8d85\u30cf\u30de\u308a\u307e\u3057\u305f\u3002 \u30b0\u30b0\u3063\u3066\u3082\u306a\u304b\u306a\u304b\u305d\u306e\u3082\u306e\u30ba\u30d0\u30ea\u306e\u89e3\u304c\u898b\u3064\u304b\u3089\u305a\u304b\u306a\u308a\u60a9\u3093\u3060\u306e\u3067 \u540c\u3058\u554f\u984c\u3067\u8e93\u3044\u305f\u8ab0\u304b\u306e\u4e00\u52a9\u306b\u306a\u308c\u3070\u5e78\u3044\u3060\u3068\u601d\u3044\u3053\u3053\u306b\u8a18\u9332\u3092\u306e\u3053\u3057\u3066\u304a\u304d\u307e\u3059\u3002 Gi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-246","post","type-post","status-publish","format-standard","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=246"}],"version-history":[{"count":1,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/246\/revisions"}],"predecessor-version":[{"id":329,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/246\/revisions\/329"}],"wp:attachment":[{"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}