{"id":304,"date":"2022-03-05T19:04:37","date_gmt":"2022-03-05T11:04:37","guid":{"rendered":"https:\/\/fugary.com\/?p=304"},"modified":"2022-03-05T20:32:17","modified_gmt":"2022-03-05T12:32:17","slug":"%e7%be%a4%e6%99%96nas%e6%90%ad%e5%bb%ba%e7%a7%81%e6%9c%89gitlab%e4%bb%93%e5%ba%93","status":"publish","type":"post","link":"https:\/\/fugary.com\/?p=304","title":{"rendered":"\u7fa4\u6656NAS\u642d\u5efa\u79c1\u6709Gitlab\u4ed3\u5e93"},"content":{"rendered":"<h3>\u80cc\u666f<\/h3>\n<p><code>Github<\/code>\u7f51\u7ad9\u7ecf\u5e38\u5361\u58f3\uff0c<code>Gitee<\/code>\u514d\u8d39\u7248\u53c8\u6709\u8bf8\u591a\u9650\u5236\uff0c\u4e8e\u662f\u5c31\u6253\u7b97\u81ea\u5efa<code>Git<\/code>\u670d\u52a1\u3002<\/p>\n<p>\u7fa4\u6656\u5176\u5b9e\u81ea\u5e26\u4e00\u4e2a\u53eb<code>Git Server<\/code>\u7684\u5957\u4ef6\uff0c\u4e0d\u8fc7\u6ca1\u6709\u56fe\u5f62\u754c\u9762\uff0c\u800c\u4e14\u8fd8\u8981\u5f00\u653e<code>ssh<\/code>\u7aef\u53e3\uff08<code>ssh<\/code>\u7aef\u53e3\u5f00\u653e\u5bb9\u6613\u88ab\u653b\u51fb\uff09\uff0c\u4e0d\u5efa\u8bae\u4f7f\u7528\uff0c\u5efa\u8bae\u4f7f\u7528<code>Docker<\/code>\u914d\u5408<code>gitlab-ce<\/code>\u6765\u642d\u5efa\u3002<\/p>\n<p><code>Gitlab<\/code>\u6709\u4f01\u4e1a\u7248\u548c\u793e\u533a\u7248\uff0c\u4e2a\u4eba\u7528\u6237\u5c31\u9009\u62e9\u793e\u533a\u7248\u591f\u7528\u4e86\u3002<\/p>\n<p><strong>\u6ce8\uff1aGitlab\u4f9d\u8d56\u5f88\u591a\uff0c\u542f\u52a8\u901f\u5ea6\u5f88\u6162\uff0c\u800c\u4e14\u6bd4\u8f83\u8017\u8d44\u6e90\uff0c\u5982\u679cNAS\u7684\u914d\u7f6e\u8f83\u5dee\u7684\u8bdd\uff0c\u5efa\u8bae\u4e0d\u8981\u5b89\u88c5\u4e86\u3002<\/strong><\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304154227.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304154227.png\" alt=\"image-20220304154227611\" \/><\/div><\/p>\n<h3>\u4e0b\u8f7dGitlab\u955c\u50cf<\/h3>\n<p>\u5b89\u88c5\u53c2\u8003\u6587\u6863\uff1a<a href=\"https:\/\/docs.gitlab.com\/ee\/install\/docker.html\">https:\/\/docs.gitlab.com\/ee\/install\/docker.html<\/a><\/p>\n<p>\u9996\u5148\u6253\u5f00<code>Docker<\/code>\u5957\u4ef6\uff0c\u641c\u7d22<code>gitlab-ce<\/code>\uff0c\u7136\u540e\u53cc\u51fb\u5b89\u88c5\uff0c\u9009\u62e9<code>latest<\/code>\u6700\u65b0\u7248\u3002<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304145127.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304145127.png\" alt=\"\" \/><\/div><\/p>\n<p>\u6587\u4ef6\u6709\u70b9\u5927\uff082G\uff09\uff0c\u9700\u8981\u5fcd\u4e00\u5fcd\u3002<\/p>\n<h3>\u914d\u7f6e\u5e76\u542f\u52a8Gitlab\u5bb9\u5668<\/h3>\n<p>\u9996\u5148\u9700\u8981\u628a\u76f8\u5173\u76ee\u5f55\u5efa\u7acb\u8d77\u6765\uff0c\u53c2\u8003\u6587\u6863\u914d\u7f6e\uff0c\u672c\u5730\u8bbe\u7f6e\u6839\u76ee\u5f55\u914d\u7f6e\u4e3a<code>\/docker\/gitlab<\/code>\uff0c\u65b0\u5efa\u76ee\u5f55<\/p>\n<p>\u6570\u636e\u76ee\u5f55\uff1a<code>\/docker\/gitlab\/data<\/code><br \/>\n\u65e5\u5fd7\u76ee\u5f55\uff1a<code>\/docker\/gitlab\/logs<\/code><br \/>\n\u914d\u7f6e\u76ee\u5f55\uff1a<code>\/docker\/gitlab\/config<\/code><\/p>\n<p>\u4e0b\u8f7d\u540e\u914d\u7f6e\uff1a<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304145302.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304145302.png\" alt=\"\" \/><\/div><\/p>\n<p>\u914d\u7f6e\u8def\u5f84\u6620\u5c04<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\u672c\u5730\u8def\u5f84<\/th>\n<th style=\"text-align: left;\">\u5bb9\u5668\u8def\u5f84<\/th>\n<th style=\"text-align: left;\">\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>\/docker\/gitlab\/data<\/code><\/td>\n<td style=\"text-align: left;\"><code>\/var\/opt\/gitlab<\/code><\/td>\n<td style=\"text-align: left;\">\u6570\u636e\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>\/docker\/gitlab\/logs<\/code><\/td>\n<td style=\"text-align: left;\"><code>\/var\/log\/gitlab<\/code><\/td>\n<td style=\"text-align: left;\">\u65e5\u5fd7\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>\/docker\/gitlab\/config<\/code><\/td>\n<td style=\"text-align: left;\"><code>\/etc\/gitlab<\/code><\/td>\n<td style=\"text-align: left;\">\u914d\u7f6e\u6587\u4ef6\u7b49<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304150443.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304150443.png\" alt=\"image-20220304150443037\" \/><\/div><\/p>\n<p>\u914d\u7f6e\u7aef\u53e3\u6620\u5c04\uff0c\u5176\u4ed6\u7aef\u53e3\u53ef\u4ee5\u4e0d\u6539\u53d8\uff0c\u914d\u7f6e\u4e00\u4e2a\u9700\u8981\u4f7f\u7528\u7684<code>web<\/code>\u7aef\u7aef\u53e3\u3002<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304150701.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304150701.png\" alt=\"image-20220304150701039\" \/><\/div><\/p>\n<p>\u914d\u7f6e\u4e00\u4e9b\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n<p>\u53c2\u8003\u73af\u5883\u53d8\u91cf\uff1a<a href=\"https:\/\/docs.gitlab.com\/ee\/administration\/environment_variables.html#supported-environment-variables\">https:\/\/docs.gitlab.com\/ee\/administration\/environment_variables.html#supported-environment-variables<\/a><\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/202203051815162.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/202203051815162.png\" alt=\"image-20220305181503049\" \/><\/div><\/p>\n<p>\u914d\u7f6e\u5e38\u7528\u7684\u5373\u53ef<\/p>\n<table>\n<thead>\n<tr>\n<th>\u53d8\u91cf\u540d<\/th>\n<th>\u914d\u7f6e\u503c<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>GITLAB_HOST<\/code><\/td>\n<td><a href=\"http:\/\/nas_ip_or_domain:8888\">http:\/\/nas_ip_or_domain:8888<\/a><\/td>\n<td>\u8bbf\u95ee\u5730\u5740\uff0c\u6d4b\u8bd5\u4e0b\u6765\u4f3c\u4e4e\u6ca1\u6709\u4ec0\u4e48\u6548\u679c\uff0c\u8fd8\u662f\u8981\u6dfb\u52a0<code>external_url<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>GITLAB_ROOT_PASSWORD<\/code><\/td>\n<td><code>root<\/code>\u914d\u7f6e\u5bc6\u7801<\/td>\n<td>\u53ef\u4ee5\u4e0d\u914d\u7f6e\uff0c\u540e\u9762\u901a\u8fc7\u6587\u4ef6\u53bb\u627e\u751f\u6210\u7684\u9ed8\u8ba4\u5bc6\u7801\u5373\u53ef<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u57fa\u672c\u914d\u7f6e\u5b8c\u6210\uff0c\u53ef\u4ee5\u7ee7\u7eed\u542f\u52a8\u4e86\u3002<\/p>\n<p><strong><code>Gitlab<\/code>\u542f\u52a8\u901f\u5ea6\u5f88\u6162\uff0c\u9700\u8981\u8010\u5fc3\u7b49\u5f85\u3002<\/strong><\/p>\n<p>\u914d\u7f6e\u542f\u52a8\u597d\u4e4b\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7<code>http:\/\/nas_ip_or_domain:8888\/<\/code>\u6765\u8bbf\u95ee\u3002<\/p>\n<p>\u542f\u52a8\u6162\u8bbf\u95ee\u53ef\u80fd\u662f<code>404<\/code>\uff08\u76f4\u63a5\u65e0\u6cd5\u8bbf\u95ee\uff09\uff0c\u7a0d\u540e\u53ef\u4ee5\u5f97\u5230<code>502<\/code>\u9875\u9762\uff0c\u518d\u7b49\u7b49\u5c31\u597d\u4e86\u3002<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304151652.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304151652.png\" alt=\"image-20220304151652412\" \/><\/div><\/p>\n<p>\u542f\u52a8\u5b8c\u6210\u540e\u5f97\u5230\u767b\u5f55\u9875\u9762\uff1a<\/p>\n<p>\u8d26\u53f7\uff1a<code>root<\/code><\/p>\n<p>\u5bc6\u7801\uff1a<code>GITLAB_ROOT_PASSWORD<\/code>\u914d\u7f6e\u7684\u503c<\/p>\n<p>\u767b\u5f55\u7cfb\u7edf\uff1a<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304153337.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304153337.png\" alt=\"image-20220304153337327\" \/><\/div><\/p>\n<p>\u540e\u7eed\u4e00\u4e9b\u57fa\u672c\u64cd\u4f5c\u53ef\u4ee5\u5728\u56fe\u5f62\u754c\u9762\u5b8c\u6210\u3002<\/p>\n<h3>Web\u57fa\u672c\u64cd\u4f5c<\/h3>\n<h4>\u5173\u95ed\u6ce8\u518c<\/h4>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u662f\u5f00\u653e\u6ce8\u518c\uff0c\u53ef\u4ee5\u5173\u95ed\u6ce8\u518c\uff0c\u624b\u52a8\u6765\u6dfb\u52a0\u7528\u6237\u3002<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304154341.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304154341.png\" alt=\"image-20220304154341852\" \/><\/div><\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304155036.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304155036.png\" alt=\"image-20220304155036659\" \/><\/div><\/p>\n<p>\u9700\u8981\u70b9\u51fb\u3010Save Changes\u3011\u4fdd\u5b58\u3002<\/p>\n<h4>\u4fee\u6539\u5bc6\u7801<\/h4>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304155425.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304155425.png\" alt=\"image-20220304155425010\" \/><\/div><\/p>\n<p>\u4fee\u6539\u7ba1\u7406\u5458\u5bc6\u7801\uff1a<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304155601.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304155601.png\" alt=\"image-20220304155601421\" \/><\/div><\/p>\n<h3>\u914d\u7f6eGitlab<\/h3>\n<p><code>Gitlab<\/code>\u4e00\u4e9b\u5e38\u89c4\u914d\u7f6e\u90fd\u5728<code>\/docker\/gitlab\/config\/gitlab.rb<\/code>\u6587\u4ef6\u4e2d\u3002<\/p>\n<h4>\u914d\u7f6eSMTP\u90ae\u7bb1<\/h4>\n<p>\u65b0\u5efa\u8d26\u6237\u7b49\u5f88\u591a\u64cd\u4f5c\u9700\u8981\u53d1\u9001\u90ae\u4ef6\uff0c\u56e0\u6b64\u9700\u8981\u5148\u914d\u7f6e\u597d<code>SMTP<\/code>\u90ae\u7bb1\uff0c\u8fd9\u91cc\u5047\u8bbe\u5df2\u7ecf\u63d0\u524d\u4ece\u90ae\u4ef6\u670d\u52a1\u5546\u83b7\u53d6\u5230<code>SMTP<\/code>\u767b\u5f55\u76f8\u5173\u8d26\u6237\u5bc6\u7801\u7b49\u4fe1\u606f\u4e86\u3002<\/p>\n<p>\u7f16\u8f91<code>\/docker\/gitlab\/config\/gitlab.rb<\/code>\u6587\u4ef6\uff0c\u6211\u8fd9\u91cc\u4f7f\u7528<code>qq<\/code>\u7684\u90ae\u7bb1<\/p>\n<pre><code class=\"language-ruby\">gitlab_rails[&#039;smtp_enable&#039;] = true\ngitlab_rails[&#039;smtp_address&#039;] = &quot;stmp.qq.com&quot;\ngitlab_rails[&#039;smtp_port&#039;] = 465\ngitlab_rails[&#039;smtp_user_name&#039;] = &quot;xxxxx@vip.qq.com&quot;\ngitlab_rails[&#039;smtp_password&#039;] = &quot;xxxxxx&quot;\ngitlab_rails[&#039;smtp_domain&#039;] = &quot;stmp.qq.com&quot;\ngitlab_rails[&#039;smtp_authentication&#039;] = &quot;login&quot;\ngitlab_rails[&#039;smtp_enable_starttls_auto&#039;] = true\ngitlab_rails[&#039;smtp_tls&#039;] = false\ngitlab_rails[&#039;smtp_pool&#039;] = true\ngitlab_rails[&#039;gitlab_email_from&#039;] = &#039;xxxxx@vip.qq.com&#039;\n\n# \u5176\u4ed6\u9644\u52a0\u914d\u7f6e\n# \u65f6\u533a\ngitlab_rails[&#039;time_zone&#039;] = &#039;Asia\/Shanghai&#039;<\/code><\/pre>\n<p>\u6709\u4e0d\u5c11\u6587\u7ae0\u8bf4\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\uff1a<code>\/docker\/gitlab\/data\/gitlab-rails\/etc\/gitlab.yml<\/code>\uff0c\u5176\u5b9e\u8fd9\u4e2a\u6587\u4ef6\u662f\u4e0d\u5efa\u8bae\u4fee\u6539\uff0c\u56e0\u4e3a\u6267\u884c<code>gitlab-ctl reconfigure<\/code>\u540e\u4f1a\u88ab\u8986\u76d6\uff0c\u8981\u4fee\u6539\u53ea\u80fd\u4fee\u6539<code>\/docker\/gitlab\/config\/gitlab.rb<\/code>\u6587\u4ef6\u3002<\/p>\n<pre><code class=\"language-yml\"># This file is managed by gitlab-ctl. Manual changes will be\n# erased! To change the contents below, edit \/etc\/gitlab\/gitlab.rb\n# and run `sudo gitlab-ctl reconfigure`.<\/code><\/pre>\n<p>\u4fee\u6539\u5b8c\u6210\u540e\u9700\u8981\u91cd\u65b0\u914d\u7f6e\uff0c\u53ef\u4ee5\u5728<code>docker<\/code>\u4e2d\u8fdb\u5165\u7ec8\u7aef\u6267\u884c\uff1a<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304171510.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304171510.png\" alt=\"image-20220304171510521\" \/><\/div><\/p>\n<p>\u8fdb\u5165\u7ec8\u7aef\uff0c\u6267\u884c\u547d\u4ee4\uff1a<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304171902.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304171902.png\" alt=\"image-20220304171902877\" \/><\/div><\/p>\n<pre><code class=\"language-sh\">gitlab-ctl reconfigure<\/code><\/pre>\n<p>\u53ef\u4ee5\u5c1d\u8bd5\u91cd\u53d1\u4e00\u5c01\u90ae\u4ef6\u6765\u6d4b\u8bd5\uff1a<\/p>\n<p>\u5730\u5740\uff1a<a href=\"http:\/\/nas_ip_or_domain:8888\/users\/confirmation\/new\">http:\/\/nas_ip_or_domain:8888\/users\/confirmation\/new<\/a><\/p>\n<h4>\u65b0\u5efa\u8d26\u6237<\/h4>\n<p>\u627e\u5230Menu-&gt; Admin\u83dc\u5355\uff1a<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304155738.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304155738.png\" alt=\"image-20220304155738627\" \/><\/div><\/p>\n<p>\u65b0\u5efa\u8d26\u6237\uff1a<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304162711.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/20220304162711.png\" alt=\"image-20220304162710964\" \/><\/div><\/p>\n<p>\u91cd\u7f6e\u5bc6\u7801\u90ae\u4ef6\u4f1a\u901a\u8fc7\u90ae\u4ef6\u53d1\u9001\u5230\u90ae\u7bb1\uff0c\u7136\u540e\u5c31\u53ef\u4ee5\u4fee\u6539\u5bc6\u7801\u3002<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/202203042054812.png'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/202203042054812.png\" alt=\"image-20220304205459639\" \/><\/div><\/p>\n<p><strong>\u7ba1\u7406\u5458\u4e5f\u53ef\u4ee5\u518d\u6b21\u6253\u5f00\u7f16\u8f91\u7528\u6237\u7684\u9875\u9762\uff0c\u624b\u52a8\u8bbe\u7f6e\u5bc6\u7801\u3002<\/strong><\/p>\n<p>\u540e\u7eed\u64cd\u4f5c\u57fa\u672c\u90fd\u53ef\u4ee5\u5728\u7f51\u9875\u4e0a\u5b8c\u6210\u64cd\u4f5c\u4e86\u3002<\/p>\n<h3>Gitlab HTTPS\u652f\u6301<\/h3>\n<p>\u4e00\u822c\u6bd4\u8f83\u63a8\u8350\u4f7f\u7528<code>HTTPS<\/code>\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ef\u4ee5\u6dfb\u52a0<code>https<\/code>\u652f\u6301\u3002<\/p>\n<h4>\u7533\u8bf7\u514d\u8d39\u8bc1\u4e66<\/h4>\n<p>\u53ef\u4ee5\u4ecehttps:\/\/freessl.cn\u7533\u8bf7\u8bc1\u4e66\uff0c\u53c2\u8003\uff1a<a href=\"https:\/\/fugary.com\/?p=280\">https:\/\/fugary.com\/?p=280<\/a><\/p>\n<p>\u53ef\u4ee5\u4ece<code>KeyManager<\/code>\u5bfc\u51fa\u7684<code>zip<\/code>\u6587\u4ef6\u4e2d\u83b7\u53d6<code>key<\/code>\u548c<code>crt<\/code>\u6587\u4ef6\u3002<\/p>\n<h4>\u914d\u7f6ehttps<\/h4>\n<p>\u8fd8\u662f\u5728<code>\/docker\/gitlab\/config\/gitlab.rb<\/code>\u6587\u4ef6\u4e2d\u914d\u7f6e\uff1a<\/p>\n<p><code>external_url<\/code>\u914d\u7f6e\u7684\u65f6\u5019<code>http<\/code>\u6539\u6210<code>https<\/code><\/p>\n<p>\u628a\u8bc1\u4e66\u548c\u79d8\u94a5\u6587\u4ef6\u4e0a\u4f20\u5230<code>\/docker\/gitlab\/config\/ssl\/<\/code>\uff08\u672c\u5730\uff0c\u5bf9\u5e94\u5bb9\u5668\u7684<code>\/etc\/gitlab\/ssl\/<\/code>\uff09\u6587\u4ef6\u5939<\/p>\n<pre><code class=\"language-yml\">external_url &quot;https:\/\/xxxxxx.com:8888&quot;\n# \u7981\u7528letsencrypt\nletsencrypt[&#039;enable&#039;] = false\n# http\u8f6chttps\u8df3\u8f6c\nnginx[&#039;redirect_http_to_https&#039;] = true\n# \u8bc1\u4e66\u6587\u4ef6\nnginx[&#039;ssl_certificate&#039;] = &quot;\/etc\/gitlab\/ssl\/xxxxxx.com_chain.crt&quot;\nnginx[&#039;ssl_certificate_key&#039;] = &quot;\/etc\/gitlab\/ssl\/xxxxxx.com_key.key&quot;<\/code><\/pre>\n<p>\u7136\u540e\u4e00\u6837\u91cd\u65b0\u914d\u7f6e<code>gitlab-ctl reconfigure<\/code>\u3002<\/p>\n<h3>\u5e38\u89c1\u95ee\u9898<\/h3>\n<p>\u4e0a\u9762\u914d\u7f6e\u5b8c\u6210\u540e\u4e00\u822c\u90fd\u4f1a\u9047\u5230\u6fc0\u6d3b\u90ae\u4ef6\u7684\u5730\u5740\u6253\u5f00\u62a5\u9519\u95ee\u9898\u3002<\/p>\n<h4>\u90ae\u4ef6\u94fe\u63a5\u62a5\u9519<\/h4>\n<p>\u6536\u5230\u90ae\u4ef6\u540e\u53ef\u4ee5\u770b\u5230\uff0c\u90ae\u7bb1\u6fc0\u6d3b\u94fe\u63a5\u4e0d\u6b63\u786e\uff1a<a href=\"http:\/\/gitlab-gitlab-ce1\">http:\/\/gitlab-gitlab-ce1<\/a><\/p>\n<p>\u800c\u4e14clone\u5730\u5740\u4e5f\u4e0d\u6b63\u786e\uff0c\u56e0\u6b64\u9700\u8981\u914d\u7f6e\u5916\u90e8\u8bbf\u95ee\u5730\u5740\uff0c\u8fd8\u662f\u5728\u914d\u7f6e\u6587\u4ef6<code>\/docker\/gitlab\/config\/gitlab.rb<\/code>\u4e2d\u914d\u7f6e<\/p>\n<pre><code class=\"language-yml\"># host(clone\u5730\u5740\u6709\u95ee\u9898\uff0c\u9700\u8981\u914d\u7f6e\u8fd9\u4e2a\uff0c\u4e0d\u8fc7\u7aef\u53e3\u6620\u5c04\u4e5f\u8981\u6539\uff0c\u4ece8888:80\u6539\u62108888:8888)\nexternal_url &quot;http:\/\/nas_ip_or_domain:8888&quot;<\/code><\/pre>\n<p>\u4fee\u6539\u540e\u5982\u679c\u4f7f\u7528<code>gitlab-ctl reconfigure<\/code>\uff0c\u5c06\u4f1a\u8bbf\u95ee\u5931\u8d25\uff0c\u9700\u8981\u505c\u6b62\u5bb9\u5668\uff0c\u6539\u4e00\u4e0b\u6620\u5c04\u7aef\u53e3\u518d\u542f\u52a8\uff1a<\/p>\n<p><div class='fancybox-wrapper' data-fancybox='post-images' href='https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/202203051825222.jpg'><img src=\"https:\/\/git.mengqingpo.com:8888\/fugary\/blogpic1\/-\/raw\/master\/images\/202203051825222.jpg\" alt=\"5\" \/><\/div><\/p>\n<p>\u914d\u7f6e\u5b8c\u6210\uff0c\u53ef\u4ee5\u53d1\u73b0\u65b0\u7528\u6237\u90ae\u7bb1\u5730\u5740\u6b63\u786e\uff0cclone\u5730\u5740\u4e5f\u6b63\u786e\u4e86\u3002<\/p>\n<h4>\u6f0f\u6389\u914d\u7f6e\u5bc6\u7801<\/h4>\n<p><strong>\u5982\u679c\u6f0f\u6389\u6307\u5b9aGITLAB_ROOT_PASSWORD\u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<p>\u5bc6\u7801\u53ef\u4ee5\u5728<code>\/docker\/gitlab\/config\/initial_root_password<\/code>\u6587\u4ef6\u4e2d\u627e\u5230\uff0c\u53ef\u4ee5\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u770b\u5230\uff1a<\/p>\n<p>\u770b\u8bf4\u660e\u662f\u63d0\u793a\u589e\u52a0\u73af\u5883\u53d8\u91cf<code>GITLAB_ROOT_PASSWORD=xxxx<\/code>\u3002<\/p>\n<pre><code class=\"language-properties\"># WARNING: This value is valid only in the following conditions\n#          1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails[&#039;initial_root_password&#039;]` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).\n#          2. Password hasn&#039;t been changed manually, either via UI or via command line.\n#\n#          If the password shown here doesn&#039;t work, you must reset the admin password following https:\/\/docs.gitlab.com\/ee\/security\/reset_user_password.html#reset-your-root-password.\n\nPassword: xxxxxxxxxxxxxxxxxxxxxxxx\n\n# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u80cc\u666f Github\u7f51\u7ad9\u7ecf\u5e38\u5361\u58f3\uff0cGitee\u514d\u8d39\u7248\u53c8\u6709\u8bf8\u591a\u9650\u5236\uff0c\u4e8e\u662f\u5c31\u6253\u7b97\u81ea\u5efaGit\u670d\u52a1\u3002 \u7fa4\u6656\u5176\u5b9e\u81ea\u5e26\u4e00\u4e2a\u53ebG [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14,25],"tags":[64,31],"_links":{"self":[{"href":"https:\/\/fugary.com\/index.php?rest_route=\/wp\/v2\/posts\/304"}],"collection":[{"href":"https:\/\/fugary.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fugary.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fugary.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fugary.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304"}],"version-history":[{"count":2,"href":"https:\/\/fugary.com\/index.php?rest_route=\/wp\/v2\/posts\/304\/revisions"}],"predecessor-version":[{"id":306,"href":"https:\/\/fugary.com\/index.php?rest_route=\/wp\/v2\/posts\/304\/revisions\/306"}],"wp:attachment":[{"href":"https:\/\/fugary.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fugary.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fugary.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}