{"id":19253,"date":"2024-11-19T08:51:49","date_gmt":"2024-11-19T00:51:49","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19253\/"},"modified":"2024-11-19T08:51:49","modified_gmt":"2024-11-19T00:51:49","slug":"%e6%8e%a2%e8%ae%a8gitlab%e7%bd%91%e5%9d%80%e8%ae%be%e7%bd%ae%e7%9a%84%e6%ad%a5%e9%aa%a4","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19253\/","title":{"rendered":"\u63a2\u8ba8GitLab\u7f51\u5740\u8bbe\u7f6e\u7684\u6b65\u9aa4"},"content":{"rendered":"<p>gitlab\u662f\u4e00\u4e2a\u975e\u5e38\u6d41\u884c\u7684\u5f00\u6e90\u8f6f\u4ef6\u5de5\u5177\uff0c\u5b83\u4e3a\u56e2\u961f\u534f\u4f5c\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u652f\u6301\u3002\u5982\u679c\u4f60\u6b63\u51c6\u5907\u4f7f\u7528gitlab\u5c06\u9879\u76ee\u653e\u5728\u4e00\u4e2a\u5171\u4eab\u7684\u4f4d\u7f6e\uff0c\u5e76\u4e0e\u56e2\u961f\u6210\u5458\u4e00\u8d77\u534f\u4f5c\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u4e86\u89e3\u5982\u4f55\u8bbe\u7f6egitlab\u7f51\u5740\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8gitlab\u7f51\u5740\u8bbe\u7f6e\u7684\u6b65\u9aa4\uff0c\u4ee5\u4fbf\u4f60\u80fd\u591f\u5feb\u901f\u5730\u4e0a\u624b\u3002<\/p>\n<p>\u7b2c\u4e00\u6b65\uff1a\u9009\u62e9\u4f60\u7684GitLab\u4e3b\u673a\u540d\u548c\u57df\u540d<\/p>\n<p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u9009\u62e9\u4e00\u4e2aGitLab\u4e3b\u673a\u540d\u548c\u57df\u540d\u3002\u8fd9\u4e2a\u4e3b\u673a\u540d\u53ef\u4ee5\u662f\u4efb\u4f55\u547d\u540d\uff0c\u4f46\u6700\u597d\u662f\u4e00\u4e9b\u6709\u610f\u4e49\u7684\u540d\u79f0\uff0c\u65b9\u4fbf\u60a8\u548c\u60a8\u7684\u56e2\u961f\u6210\u5458\u8bb0\u5fc6\u3002\u5f53\u7136\uff0c\u4f60\u4e5f\u9700\u8981\u9009\u62e9\u4e00\u4e2a\u57df\u540d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4f60\u81ea\u5df1\u7684\u57df\u540d\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u7684\u57df\u540d\u3002<\/p>\n<p>\u5efa\u8bae\u4f60\u9009\u62e9\u4e00\u4e2a\u6613\u4e8e\u8bb0\u5fc6\u7684\u4e3b\u673a\u540d\u548c\u57df\u540d\uff0c\u8fd9\u6837\u4f60\u7684\u56e2\u961f\u6210\u5458\u4e5f\u66f4\u5bb9\u6613\u8bb0\u5fc6\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65\uff1a\u914d\u7f6eDNS<\/p>\n<p>\u914d\u7f6eDNS\u662fGitLab\u7f51\u5740\u8bbe\u7f6e\u4e2d\u6700\u91cd\u8981\u7684\u4e00\u6b65\u3002\u4f60\u9700\u8981\u628a\u4f60\u7684\u57df\u540d\u6307\u5411\u4f60\u7684GitLab\u670d\u52a1\u5668\u7684IP\u5730\u5740\u3002\u5728\u8fd9\u4e00\u6b65\uff0c\u4f60\u9700\u8981\u4e00\u4e9b\u7f51\u7edc\u77e5\u8bc6\uff0c\u5982\u679c\u4f60\u6709\u56f0\u96be\uff0c\u5efa\u8bae\u4f60\u54a8\u8be2\u4e00\u4e9b\u7f51\u7edc\u4e13\u5bb6\u3002<\/p>\n<p>\u7b2c\u4e09\u6b65\uff1a\u914d\u7f6eGitLab\u7684\u7f51\u5740<\/p>\n<p>\u4e00\u65e6\u4f60\u7684DNS\u914d\u7f6e\u5b8c\u6210\uff0c\u4f60\u9700\u8981\u5728GitLab\u4e2d\u914d\u7f6e\u7f51\u5740\u3002\u5728GitLab\u4e2d\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7Web\u754c\u9762\u6216\u8005\u547d\u4ee4\u884c\u754c\u9762\u6765\u914d\u7f6e\u7f51\u5740\u3002<\/p>\n<p>\u5728Web\u754c\u9762\u4e2d\uff0c\u4f60\u9700\u8981\u6253\u5f00GitLab\u7684\u7ba1\u7406\u5458\u754c\u9762\uff0c\u9009\u62e9\u201c\u8bbe\u7f6e\u201d\u7684\u9009\u9879\uff0c\u5728\u5176\u4e2d\u9009\u62e9\u201c\u5e38\u89c4\u201d\u9009\u9879\u3002\u5728\u8fd9\u91cc\u4f60\u53ef\u4ee5\u770b\u5230\u4e00\u4e9b\u9009\u9879\uff0c\u4f8b\u5982\u201c\u4e3b\u673a\u540d\u201d\u3001\u201c\u7aef\u53e3\u201d\u3001\u201cHttps\u201d\u7b49\u7b49\u3002\u4f60\u9700\u8981\u586b\u5165\u4f60\u7684\u57df\u540d\u548c\u7aef\u53e3\u53f7\uff0c\u7136\u540e\u4fdd\u5b58\u8bbe\u7f6e\uff0cGitLab\u5c31\u4f1a\u4f7f\u7528\u4f60\u9009\u62e9\u7684\u7f51\u5740\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u754c\u9762\u6765\u8bbe\u7f6eGitLab\u7684\u7f51\u5740\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>sudo gitlab-ctl reconfigure<\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u5c06\u4f1a\u91cd\u65b0\u914d\u7f6eGitLab\uff0c\u5e76\u4f7f\u7528\u4f60\u6240\u8bbe\u7f6e\u7684\u7f51\u5740\u3002<\/p>\n<p>\u7b2c\u56db\u6b65\uff1a\u6d4b\u8bd5\u7f51\u5740<\/p>\n<p>\u6700\u540e\uff0c\u4f60\u9700\u8981\u6d4b\u8bd5\u4f60\u7684GitLab\u7684\u7f51\u5740\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u6d4f\u89c8\u5668\u6765\u6d4b\u8bd5\u4f60\u7684\u7f51\u5740\u662f\u5426\u53ef\u7528\uff0c\u5982\u679c\u53ef\u4ee5\u6253\u5f00GitLab\u7684\u767b\u5f55\u754c\u9762\uff0c\u90a3\u4e48\u4f60\u7684\u7f51\u5740\u5c31\u662f\u6b63\u786e\u7684\u3002<\/p>\n<p>\u603b\u7ed3\uff1a<\/p>\n<p>\u5408\u7406\u7684GitLab\u7f51\u5740\u8bbe\u7f6e\u5bf9\u4e8e\u56e2\u961f\u534f\u4f5c\u548c\u9879\u76ee\u7ba1\u7406\u6709\u7740\u81f3\u5173\u91cd\u8981\u7684\u4f5c\u7528\u3002\u5728\u9009\u62e9\u4e3b\u673a\u540d\u548c\u57df\u540d\u65f6\uff0c\u4f60\u9700\u8981\u9009\u53d6\u4e00\u4e2a\u6613\u4e8e\u8bb0\u5fc6\u7684\u540d\u79f0\uff0c\u5e76\u4e14\u5728\u914d\u7f6eDNS\u65f6\uff0c\u4f60\u9700\u8981\u4e00\u4e9b\u7f51\u7edc\u77e5\u8bc6\u3002\u5728\u914d\u7f6e\u5b8cDNS\u4e4b\u540e\uff0c\u4f60\u9700\u8981\u5728GitLab\u4e2d\u914d\u7f6e\u7f51\u5740\uff0c\u5e76\u6d4b\u8bd5\u4f60\u7684\u7f51\u5740\u662f\u5426\u6b63\u786e\u3002\u53ea\u6709\u6b63\u786e\u7684\u7f51\u5740\uff0c\u624d\u80fd\u4fdd\u8bc1\u4f60\u7684\u56e2\u961f\u534f\u4f5c\u5de5\u4f5c\u7684\u987a\u5229\u8fdb\u884c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u63a2\u8ba8GitLab\u7f51\u5740\u8bbe\u7f6e\u7684\u6b65\u9aa4\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>gitlab\u662f\u4e00\u4e2a\u975e\u5e38\u6d41\u884c\u7684\u5f00\u6e90\u8f6f\u4ef6\u5de5\u5177\uff0c\u5b83\u4e3a\u56e2\u961f\u534f\u4f5c\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u652f\u6301\u3002\u5982\u679c\u4f60\u6b63\u51c6\u5907\u4f7f\u7528gitlab\u5c06\u9879\u76ee\u653e\u5728\u4e00\u4e2a\u5171\u4eab\u7684\u4f4d\u7f6e\uff0c\u5e76\u4e0e\u56e2\u961f\u6210\u5458\u4e00\u8d77\u534f\u4f5c\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u4e86\u89e3\u5982\u4f55\u8bbe\u7f6egitlab\u7f51\u5740\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8gitlab\u7f51\u5740\u8bbe\u7f6e\u7684\u6b65\u9aa4\uff0c\u4ee5\u4fbf\u4f60\u80fd\u591f\u5feb\u901f\u5730\u4e0a\u624b\u3002 \u7b2c\u4e00\u6b65\uff1a\u9009\u62e9\u4f60\u7684GitLab\u4e3b\u673a\u540d\u548c\u57df\u540d \u9996\u5148\uff0c\u4f60\u9700\u8981\u9009\u62e9\u4e00\u4e2aGitLab\u4e3b\u673a\u540d\u548c\u57df\u540d\u3002\u8fd9\u4e2a\u4e3b\u673a\u540d\u53ef\u4ee5\u662f\u4efb\u4f55\u547d\u540d\uff0c\u4f46\u6700\u597d\u662f\u4e00\u4e9b\u6709\u610f\u4e49\u7684\u540d\u79f0\uff0c\u65b9\u4fbf\u60a8\u548c\u60a8\u7684\u56e2\u961f\u6210\u5458\u8bb0\u5fc6\u3002\u5f53\u7136\uff0c\u4f60\u4e5f\u9700\u8981\u9009\u62e9\u4e00\u4e2a\u57df\u540d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4f60\u81ea\u5df1\u7684\u57df\u540d\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u7684\u57df\u540d\u3002 \u5efa\u8bae\u4f60\u9009\u62e9\u4e00\u4e2a\u6613\u4e8e\u8bb0\u5fc6\u7684\u4e3b\u673a\u540d\u548c\u57df\u540d\uff0c\u8fd9\u6837\u4f60\u7684\u56e2\u961f\u6210\u5458\u4e5f\u66f4\u5bb9\u6613\u8bb0\u5fc6\u3002 \u7b2c\u4e8c\u6b65\uff1a\u914d\u7f6eDNS \u914d\u7f6eDNS\u662fGitLab\u7f51\u5740\u8bbe\u7f6e\u4e2d\u6700\u91cd\u8981\u7684\u4e00\u6b65\u3002\u4f60\u9700\u8981\u628a\u4f60\u7684\u57df\u540d\u6307\u5411\u4f60\u7684GitLab\u670d\u52a1\u5668\u7684IP\u5730\u5740\u3002\u5728\u8fd9\u4e00\u6b65\uff0c\u4f60\u9700\u8981\u4e00\u4e9b\u7f51\u7edc\u77e5\u8bc6\uff0c\u5982\u679c\u4f60\u6709\u56f0\u96be\uff0c\u5efa\u8bae\u4f60\u54a8\u8be2\u4e00\u4e9b\u7f51\u7edc\u4e13\u5bb6\u3002 \u7b2c\u4e09\u6b65\uff1a\u914d\u7f6eGitLab\u7684\u7f51\u5740 \u4e00\u65e6\u4f60\u7684DNS\u914d\u7f6e\u5b8c\u6210\uff0c\u4f60\u9700\u8981\u5728GitLab\u4e2d\u914d\u7f6e\u7f51\u5740\u3002\u5728GitLab\u4e2d\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7Web\u754c\u9762\u6216\u8005\u547d\u4ee4\u884c\u754c\u9762\u6765\u914d\u7f6e\u7f51\u5740\u3002 \u5728Web\u754c\u9762\u4e2d\uff0c\u4f60\u9700\u8981\u6253\u5f00GitLab\u7684\u7ba1\u7406\u5458\u754c\u9762\uff0c\u9009\u62e9\u201c\u8bbe\u7f6e\u201d\u7684\u9009\u9879\uff0c\u5728\u5176\u4e2d\u9009\u62e9\u201c\u5e38\u89c4\u201d\u9009\u9879\u3002\u5728\u8fd9\u91cc\u4f60\u53ef\u4ee5\u770b\u5230\u4e00\u4e9b\u9009\u9879\uff0c\u4f8b\u5982\u201c\u4e3b\u673a\u540d\u201d\u3001\u201c\u7aef\u53e3\u201d\u3001\u201cHttps\u201d\u7b49\u7b49\u3002\u4f60\u9700\u8981\u586b\u5165\u4f60\u7684\u57df\u540d\u548c\u7aef\u53e3\u53f7\uff0c\u7136\u540e\u4fdd\u5b58\u8bbe\u7f6e\uff0cGitLab\u5c31\u4f1a\u4f7f\u7528\u4f60\u9009\u62e9\u7684\u7f51\u5740\u3002 \u53e6\u5916\uff0c\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u754c\u9762\u6765\u8bbe\u7f6eGitLab\u7684\u7f51\u5740\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a sudo gitlab-ctl reconfigure \u8fd9\u4e2a\u547d\u4ee4\u5c06\u4f1a\u91cd\u65b0\u914d\u7f6eGitLab\uff0c\u5e76\u4f7f\u7528\u4f60\u6240\u8bbe\u7f6e\u7684\u7f51\u5740\u3002 \u7b2c\u56db\u6b65\uff1a\u6d4b\u8bd5\u7f51\u5740 \u6700\u540e\uff0c\u4f60\u9700\u8981\u6d4b\u8bd5\u4f60\u7684GitLab\u7684\u7f51\u5740\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u6d4f\u89c8\u5668\u6765\u6d4b\u8bd5\u4f60\u7684\u7f51\u5740\u662f\u5426\u53ef\u7528\uff0c\u5982\u679c\u53ef\u4ee5\u6253\u5f00GitLab\u7684\u767b\u5f55\u754c\u9762\uff0c\u90a3\u4e48\u4f60\u7684\u7f51\u5740\u5c31\u662f\u6b63\u786e\u7684\u3002 \u603b\u7ed3\uff1a \u5408\u7406\u7684GitLab\u7f51\u5740\u8bbe\u7f6e\u5bf9\u4e8e\u56e2\u961f\u534f\u4f5c\u548c\u9879\u76ee\u7ba1\u7406\u6709\u7740\u81f3\u5173\u91cd\u8981\u7684\u4f5c\u7528\u3002\u5728\u9009\u62e9\u4e3b\u673a\u540d\u548c\u57df\u540d\u65f6\uff0c\u4f60\u9700\u8981\u9009\u53d6\u4e00\u4e2a\u6613\u4e8e\u8bb0\u5fc6\u7684\u540d\u79f0\uff0c\u5e76\u4e14\u5728\u914d\u7f6eDNS\u65f6\uff0c\u4f60\u9700\u8981\u4e00\u4e9b\u7f51\u7edc\u77e5\u8bc6\u3002\u5728\u914d\u7f6e\u5b8cDNS\u4e4b\u540e\uff0c\u4f60\u9700\u8981\u5728GitLab\u4e2d\u914d\u7f6e\u7f51\u5740\uff0c\u5e76\u6d4b\u8bd5\u4f60\u7684\u7f51\u5740\u662f\u5426\u6b63\u786e\u3002\u53ea\u6709\u6b63\u786e\u7684\u7f51\u5740\uff0c\u624d\u80fd\u4fdd\u8bc1\u4f60\u7684\u56e2\u961f\u534f\u4f5c\u5de5\u4f5c\u7684\u987a\u5229\u8fdb\u884c\u3002 \u4ee5\u4e0a\u5c31\u662f\u63a2\u8ba8GitLab\u7f51\u5740\u8bbe\u7f6e\u7684\u6b65\u9aa4\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-19253","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=19253"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19253\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}