{"id":18843,"date":"2024-11-19T12:33:16","date_gmt":"2024-11-19T04:33:16","guid":{"rendered":"https:\/\/fwq.ai\/blog\/18843\/"},"modified":"2024-11-19T12:33:16","modified_gmt":"2024-11-19T04:33:16","slug":"%e6%80%8e%e4%b9%88%e4%bf%ae%e6%94%b9gitlab%e7%9a%84ip%e5%9c%b0%e5%9d%80","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/18843\/","title":{"rendered":"\u600e\u4e48\u4fee\u6539GitLab\u7684IP\u5730\u5740"},"content":{"rendered":"<p>\u5728\u4f7f\u7528gitlab\u65f6\uff0c\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u4fee\u6539gitlab\u7684ip\u5730\u5740\uff0c\u6bd4\u5982\u5f53\u670d\u52a1\u5668\u7684ip\u5730\u5740\u53d8\u66f4\uff0c\u6216\u8005\u9700\u8981\u5c06gitlab\u4ece\u4e00\u53f0\u670d\u52a1\u5668\u8fc1\u79fb\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u65f6\uff0c\u6211\u4eec\u5c31\u9700\u8981\u4fee\u6539gitlab\u7684ip\u5730\u5740\u3002<\/p>\n<p>\u4e0b\u9762\u662fGitLab IP\u5730\u5740\u4fee\u6539\u7684\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u767b\u5f55\u5230GitLab\u670d\u52a1\u5668\uff0c\u8fdb\u5165GitLab\u7684\u5b89\u88c5\u76ee\u5f55\u3002<\/li>\n<li>\u6253\u5f00GitLab\u7684\u914d\u7f6e\u6587\u4ef6gitlab.rb\uff0c\u8be5\u6587\u4ef6\u4e00\u822c\u4f4d\u4e8e\/etc\/gitlab\/\u76ee\u5f55\u4e0b\u3002<\/li>\n<li>\u4f7f\u7528vim\u7b49\u7f16\u8f91\u5668\u6253\u5f00gitlab.rb\u6587\u4ef6\uff0c\u627e\u5230external_url\u4e00\u884c\uff0c\u5c06\u5176\u4fee\u6539\u4e3a\u65b0\u7684IP\u5730\u5740\u3002<\/li>\n<li>\u4fdd\u5b58\u5e76\u5173\u95edgitlab.rb\u6587\u4ef6\u3002<\/li>\n<li>\u8fd0\u884csudo gitlab-ctl reconfigure\u547d\u4ee4\u91cd\u65b0\u914d\u7f6eGitLab\u3002<\/li>\n<li>\u91cd\u542fGitLab\u670d\u52a1\uff0c\u8fd0\u884csudo gitlab-ctl restart\u547d\u4ee4\u3002<\/li>\n<li>\u4fee\u6539GitLab\u7684\u9632\u706b\u5899\u89c4\u5219\uff0c\u5c06\u65b0\u7684IP\u5730\u5740\u6dfb\u52a0\u5230\u9632\u706b\u5899\u767d\u540d\u5355\u4e2d\uff0c\u786e\u4fddGitLab\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee\u3002<\/li>\n<\/ol>\n<p>\u6309\u7167\u4e0a\u8ff0\u6b65\u9aa4\u4fee\u6539GitLab\u7684IP\u5730\u5740\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u4f7f\u7528\u65b0\u7684IP\u5730\u5740\u8bbf\u95eeGitLab\u4e86\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679cGitLab\u7684IP\u5730\u5740\u4fee\u6539\u540e\u65e0\u6cd5\u8bbf\u95ee\uff0c\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u9632\u706b\u5899\u89c4\u5219\u3001\u91cd\u65b0\u8fd0\u884cgitlab-ctl reconfigure\u547d\u4ee4\u7b49\u65b9\u6cd5\u8fdb\u884c\u89e3\u51b3\u3002<\/p>\n<p>\u5728GitLab\u4e2d\u4fee\u6539IP\u5730\u5740\u65f6\uff0c\u6211\u4eec\u9700\u8981\u4fdd\u8bc1\u65b0\u7684IP\u5730\u5740\u548c\u539f\u6709\u7684IP\u5730\u5740\u5728\u540c\u4e00\u5c40\u57df\u7f51\u4e2d\u3002\u5982\u679c\u5c06GitLab\u4ece\u4e00\u53f0\u670d\u52a1\u5668\u8fc1\u79fb\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u5c06GitLab\u539f\u6709\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u8fc1\u79fb\u5230\u65b0\u7684\u670d\u52a1\u5668\u4e0a\u3002\u5177\u4f53\u53ef\u4ee5\u53c2\u8003GitLab\u5b98\u65b9\u6587\u6863\u3002<\/p>\n<p>\u603b\u4e4b\uff0c\u5728\u4fee\u6539GitLab\u7684IP\u5730\u5740\u65f6\u9700\u8981\u6ce8\u610f\u786e\u4fdd\u670d\u52a1\u5668\u7f51\u7edc\u7545\u901a\u3001\u9632\u706b\u5899\u8bbe\u7f6e\u6b63\u786e\uff0c\u5e76\u9075\u5faaGitLab\u5b98\u65b9\u6587\u6863\u7684\u76f8\u5173\u8bf4\u660e\uff0c\u624d\u80fd\u786e\u4fddGitLab\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u4fee\u6539GitLab\u7684IP\u5730\u5740\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>\u5728\u4f7f\u7528gitlab\u65f6\uff0c\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u4fee\u6539gitlab\u7684ip\u5730\u5740\uff0c\u6bd4\u5982\u5f53\u670d\u52a1\u5668\u7684ip\u5730\u5740\u53d8\u66f4\uff0c\u6216\u8005\u9700\u8981\u5c06gitlab\u4ece\u4e00\u53f0\u670d\u52a1\u5668\u8fc1\u79fb\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u65f6\uff0c\u6211\u4eec\u5c31\u9700\u8981\u4fee\u6539gitlab\u7684ip\u5730\u5740\u3002 \u4e0b\u9762\u662fGitLab IP\u5730\u5740\u4fee\u6539\u7684\u5177\u4f53\u6b65\u9aa4\uff1a \u767b\u5f55\u5230GitLab\u670d\u52a1\u5668\uff0c\u8fdb\u5165GitLab\u7684\u5b89\u88c5\u76ee\u5f55\u3002 \u6253\u5f00GitLab\u7684\u914d\u7f6e\u6587\u4ef6gitlab.rb\uff0c\u8be5\u6587\u4ef6\u4e00\u822c\u4f4d\u4e8e\/etc\/gitlab\/\u76ee\u5f55\u4e0b\u3002 \u4f7f\u7528vim\u7b49\u7f16\u8f91\u5668\u6253\u5f00gitlab.rb\u6587\u4ef6\uff0c\u627e\u5230external_url\u4e00\u884c\uff0c\u5c06\u5176\u4fee\u6539\u4e3a\u65b0\u7684IP\u5730\u5740\u3002 \u4fdd\u5b58\u5e76\u5173\u95edgitlab.rb\u6587\u4ef6\u3002 \u8fd0\u884csudo gitlab-ctl reconfigure\u547d\u4ee4\u91cd\u65b0\u914d\u7f6eGitLab\u3002 \u91cd\u542fGitLab\u670d\u52a1\uff0c\u8fd0\u884csudo gitlab-ctl restart\u547d\u4ee4\u3002 \u4fee\u6539GitLab\u7684\u9632\u706b\u5899\u89c4\u5219\uff0c\u5c06\u65b0\u7684IP\u5730\u5740\u6dfb\u52a0\u5230\u9632\u706b\u5899\u767d\u540d\u5355\u4e2d\uff0c\u786e\u4fddGitLab\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee\u3002 \u6309\u7167\u4e0a\u8ff0\u6b65\u9aa4\u4fee\u6539GitLab\u7684IP\u5730\u5740\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u4f7f\u7528\u65b0\u7684IP\u5730\u5740\u8bbf\u95eeGitLab\u4e86\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679cGitLab\u7684IP\u5730\u5740\u4fee\u6539\u540e\u65e0\u6cd5\u8bbf\u95ee\uff0c\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u9632\u706b\u5899\u89c4\u5219\u3001\u91cd\u65b0\u8fd0\u884cgitlab-ctl reconfigure\u547d\u4ee4\u7b49\u65b9\u6cd5\u8fdb\u884c\u89e3\u51b3\u3002 \u5728GitLab\u4e2d\u4fee\u6539IP\u5730\u5740\u65f6\uff0c\u6211\u4eec\u9700\u8981\u4fdd\u8bc1\u65b0\u7684IP\u5730\u5740\u548c\u539f\u6709\u7684IP\u5730\u5740\u5728\u540c\u4e00\u5c40\u57df\u7f51\u4e2d\u3002\u5982\u679c\u5c06GitLab\u4ece\u4e00\u53f0\u670d\u52a1\u5668\u8fc1\u79fb\u5230\u53e6\u4e00\u53f0\u670d\u52a1\u5668\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u5c06GitLab\u539f\u6709\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u8fc1\u79fb\u5230\u65b0\u7684\u670d\u52a1\u5668\u4e0a\u3002\u5177\u4f53\u53ef\u4ee5\u53c2\u8003GitLab\u5b98\u65b9\u6587\u6863\u3002 \u603b\u4e4b\uff0c\u5728\u4fee\u6539GitLab\u7684IP\u5730\u5740\u65f6\u9700\u8981\u6ce8\u610f\u786e\u4fdd\u670d\u52a1\u5668\u7f51\u7edc\u7545\u901a\u3001\u9632\u706b\u5899\u8bbe\u7f6e\u6b63\u786e\uff0c\u5e76\u9075\u5faaGitLab\u5b98\u65b9\u6587\u6863\u7684\u76f8\u5173\u8bf4\u660e\uff0c\u624d\u80fd\u786e\u4fddGitLab\u6b63\u5e38\u8fd0\u884c\u3002 \u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u4fee\u6539GitLab\u7684IP\u5730\u5740\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-18843","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18843","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=18843"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18843\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=18843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=18843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=18843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}