{"id":10020649,"date":"2025-02-10T09:57:33","date_gmt":"2025-02-10T01:57:33","guid":{"rendered":"https:\/\/itmax.cn\/?p=10020649"},"modified":"2025-02-10T09:57:33","modified_gmt":"2025-02-10T01:57:33","slug":"%e9%a9%ac%e4%b8%8a%e5%8d%b8%e8%bd%bd%e8%bf%99%e4%b8%aa%e6%81%b6%e5%bf%83%e7%9a%84%e8%bd%af%e4%bb%b6%ef%bc%81-3","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10020649","title":{"rendered":"\u9a6c\u4e0a\u5378\u8f7d\u8fd9\u4e2a\u6076\u5fc3\u7684\u8f6f\u4ef6\uff01"},"content":{"rendered":"<h2>\u524d\u8a00<\/h2>\n<p>\u4e00\u4e2a\u591a\u6708\u524d\uff0cGitLab \u505c\u6b62\u5bf9\u4e2d\u56fd\u533a\u57df\u7528\u6237\u63d0\u4f9b\u670d\u52a1\u7684\u6d88\u606f\u76f8\u4fe1\u5927\u5bb6\u65e9\u5c31\u770b\u5230\u4e86\u5427\u3002<\/p>\n<p>\u73b0\u5728\uff0c\u5f53\u4e2d\u56fd\u533a\u57df\u7684\u7528\u6237\u8bbf\u95ee GitLab \u5b98\u7f51 gitlab.com \u5730\u5740\u65f6\uff0c\u4f1a\u88ab\u9ed8\u8ba4\u81ea\u52a8\u8df3\u8f6c\u81f3 about.gitlab.com \u9875\u9762\uff0c\u5e76\u5728\u8be5\u9875\u9762\u5f15\u5bfc\u7528\u6237\u53bb\u8bbf\u95ee\u6781\u72d0 GitLab\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092216\" alt=\"\" title=\"\"><\/p>\n<p>GitLab \u5f53\u65f6\u8fd8\u8868\u793a\u5c06\u63d0\u4f9b 60 \u5929\u8fc1\u79fb\u671f\uff0c\u5373 60 \u5929\u5185\u9700\u8981\u7528\u6237\u5b8c\u6210\u8d26\u6237\u8fc1\u79fb\uff0c\u800c\u672a\u5b8c\u6210\u8fc1\u79fb\u7684\u8d26\u6237\u53ef\u80fd\u4f1a\u88ab\u5220\u9664<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092217\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u63d0\u5230\u6781\u72d0 GitLab \u5927\u5bb6\u77e5\u9053\uff0c\u53ef\u4ee5\u770b\u6210\u201c\u4e2d\u56fd\u533a\u57df\u7279\u4f9b\u7248\u7684 GitLab\u201d\u3002<br \/>\u8fd9\u4e2a\u516c\u53f8\u4e8e 2021 \u5e74\u6210\u7acb\uff0c\u5e76\u4e14\u5ba3\u79f0\u62ff\u5230\u4e86\u6240\u8c13\u7684 GitLab \u72ec\u5bb6\u3001\u6c38\u4e45\u3001\u4e14\u4e0d\u53ef\u64a4\u9500\u7684 IP \u6388\u6743\u3002<\/p>\n<p>\u800c\u5173\u4e8e\u8fd9\u5bb6\u516c\u53f8\u7684\u98ce\u8bc4\u53e3\u7891\uff0c\u76f8\u5173\u4fe1\u606f\u7f51\u4e0a\u4e00\u641c\u4fbf\u77e5\uff0c\u4e4b\u524d\u5728\u56fd\u5185\u4e5f\u95f9\u51fa\u8fc7\u4e0d\u5c11\u65b0\u95fb\uff0c\u8fd9\u91cc\u4e5f\u5c31\u4e0d\u518d\u8d58\u8ff0\u4e86\u3002<\/p>\n<p>\u603b\u800c\u8a00\u4e4b GitLab \u8fd9\u6b21\u7684\u4e00\u7cfb\u5217\u64cd\u4f5c\uff0c\u57fa\u672c\u4e0a\u5c31\u662f\u628a\u4e2d\u56fd\u533a\u57df\u7684 GitLab \u7528\u6237\u7ed9\u5f3a\u786c\u7684\u5f15\u6d41\u5230\u6781\u72d0\u4e2d\u53bb\u3002<\/p>\n<p>\u6240\u4ee5\u5f53\u65f6\u8fd9\u4e2a\u6d88\u606f\u521a\u7206\u51fa\u65f6\uff0c\u5728\u5708\u5185\u5f15\u8d77\u4e86\u4e00\u9635\u8ba8\u8bba\uff0c\u4e0d\u5c11\u7528\u6237\u5341\u5206\u53cd\u611f\u8fd9\u4e2a\u64cd\u4f5c\uff0c\u8fd8\u6709\u7f51\u53cb\u8868\u793a<strong>\u9a6c\u4e0a\u5378\u8f7d\u8fd9\u4e2a\u6076\u5fc3\u7684\u8f6f\u4ef6<\/strong>\u3002<\/p>\n<p>\u8bf4\u5230\u8fd9\u91cc\uff0c\u90a3 GitLab \u96be\u9053\u662f\u975e\u7528\u4e0d\u53ef\u561b\uff1f<\/p>\n<p><strong>\u5f53\u7136\u4e0d\u662f\uff01<\/strong><\/p>\n<p>\u50cf\u8fd9\u79cd\u73b0\u6210\u7684\u4e91\u4e0a\u4ee3\u7801\u6258\u7ba1 SaaS \u5e73\u53f0\u54b1\u4eec\u56fd\u5185\u5c31\u6709\u5f88\u591a\uff0c\u5178\u578b\u7684\u6bd4\u5982\u7801\u4e91 Gitee\u3001\u817e\u8baf\u4e91 CODING\u3001\u963f\u91cc\u4e91\u6548 Codeup \u7b49\u7b49\u3002<\/p>\n<p>\u800c\u5982\u679c\u662f\u4e2a\u4eba\u60f3\u81ea\u5df1\u642d\u5efa\u79c1\u6709\u5316\u4ee3\u7801\u6258\u7ba1\u670d\u52a1\u7684\u8bdd\uff0c\u90a3\u9009\u62e9\u5c31\u66f4\u591a\u4e86\u3002<\/p>\n<p>\u4e4b\u524d\u4f5c\u4e3a\u6f14\u793a\uff0c\u6211\u4eec\u8fd9\u91cc\u66fe\u5206\u4eab\u8fc7\u5982\u4f55\u5728\u81ea\u6709\u670d\u52a1\u5668\u4e0a\u53bb\u642d\u5efa\u79c1\u6709\u5316\u7684 Gitlab \u4ed3\u5e93\u670d\u52a1\uff0c\u4f46\u662f\u8fd9\u5957\u65b9\u6848\u5927\u5bb6\u77e5\u9053\uff0c\u8fd8\u662f\u6bd4\u8f83\u5403\u5185\u5b58\u7b49\u8d44\u6e90\uff0c\u6240\u4ee5\u53ef\u80fd\u4f1a\u51fa\u73b0\u6027\u80fd\u74f6\u9888\u3002<\/p>\n<p>\u6240\u4ee5<strong>\u63a5\u4e0b\u6765<\/strong>\uff0c<strong>\u4f5c\u4e3a\u672c\u6587\u7684\u91cd\u70b9<\/strong>\uff0c\u6211\u4eec\u8fd9\u91cc<strong>\u518d\u6765\u68b3\u7406\u5206\u4eab\u51e0\u4e2a<\/strong>\u66f4\u52a0<strong>\u8f7b\u91cf<\/strong>\u3001<strong>\u9ad8\u6548<\/strong>\u3001\u4e14<strong>\u5f00\u6e90<\/strong>\u7684 Git \u4ee3\u7801\u4ed3\u5e93\u5e73\u66ff\u65b9\u6848\uff0c\u76f8\u4fe1\u5f88\u591a\u5c0f\u4f19\u4f34\u4e5f\u7528\u8fc7\u3002<\/p>\n<h2>Gogs<\/h2>\n<p>\u9996\u5148\u8981\u804a\u7684\u90a3\u5fc5\u987b\u662f\u5927\u540d\u9f0e\u9f0e\u7684\u5f00\u6e90\u8f6f\u4ef6 Gogs\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092218\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>Gogs \u662f\u4e00\u6b3e\u57fa\u4e8e Go \u8bed\u8a00\u5f00\u53d1\u7684\u5f00\u6e90 Git \u670d\u52a1\u9879\u76ee\uff0c\u5b83\u4ee5\u7b80\u6d01\u3001\u8f7b\u91cf\u3001\u6613\u5b89\u88c5\u3001\u8de8\u5e73\u53f0\u7b49\u7279\u70b9\uff0c\u8d62\u5f97\u4e86\u4f17\u591a\u56e2\u961f\u548c\u4e2a\u4eba\u5f00\u53d1\u8005\u7684\u9752\u7750\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092219\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7c7b\u4f3c\u4e8e GitHub \u7684\u754c\u9762\u548c\u529f\u80fd\uff0c\u5e76\u5141\u8bb8\u7528\u6237\u5728\u81ea\u5df1\u7684\u670d\u52a1\u5668\u4e0a\u642d\u5efa\u79c1\u6709\u7684 Git \u4ed3\u5e93\u548c\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092220\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u800c\u4e14 Gogs \u9879\u76ee\u4ee3\u7801 100% \u5f00\u6e90\uff0c\u6240\u6709\u7684\u6e90\u4ee3\u7801\u5747\u901a\u8fc7 MIT \u6388\u6743\u534f\u8bae\u6258\u7ba1\u5728 GitHub \u4e0a\u3002<\/p>\n<p>\u76ee\u524d Gogs \u9879\u76ee\u5728 GitHub \u4e0a\u7684 Star \u6807\u661f\u4e5f\u7a81\u7834\u4e86 45000\uff0c\u5728\u8fd9\u4e2a\u5782\u76f4\u9886\u57df\u53ef\u4ee5\u8bf4\u76f8\u5f53\u53d7\u6b22\u8fce\u4e86\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092221\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h3>\u4e3b\u8981\u7279\u6027<\/h3>\n<ul>\n<li><strong>\u5f00\u6e90\u514d\u8d39<\/strong>\uff1aGogs \u4ee3\u7801\u5f00\u6e90\u4e8e GitHub\uff0c\u5e76\u4ee5 MIT \u8bb8\u53ef\u8bc1\u53d1\u5e03\u3002<\/li>\n<li><strong>\u8f7b\u91cf\u7ea7<\/strong>\uff1aGogs \u4f7f\u7528 Go \u8bed\u8a00\u7f16\u5199\uff0c\u6613\u4e8e\u90e8\u7f72\u548c\u8fd0\u884c\uff0c\u5728\u8d44\u6e90\u6d88\u8017\u65b9\u9762\u5360\u7528\u4e5f\u6bd4\u8f83\u5c11\u3002\u76f8\u6bd4 GitLab \u7b49\u5e73\u53f0\uff0cGogs \u5bf9\u786c\u4ef6\u7684\u8981\u6c42\u66f4\u4f4e\uff0c\u4f7f\u5f97\u7528\u6237\u80fd\u591f\u66f4\u8f7b\u677e\u5730\u642d\u5efa\u81ea\u5df1\u7684 Git \u670d\u52a1\u3002<\/li>\n<li><strong>\u5feb\u901f\u7a33\u5b9a<\/strong>\uff1aGogs \u7684\u54cd\u5e94\u901f\u5ea6\u548c\u7a33\u5b9a\u6027\u90fd\u6bd4\u8f83\u5728\u7ebf\uff0c\u786e\u4fdd\u4e86\u7528\u6237\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u80fd\u591f\u4eab\u53d7\u5230\u6d41\u7545\u3001\u7a33\u5b9a\u7684\u4f53\u9a8c\u3002<\/li>\n<li><strong>\u6613\u4e8e\u4f7f\u7528<\/strong>\uff1aGogs \u5177\u6709\u76f4\u89c2\u7684\u7528\u6237\u754c\u9762\uff0c\u4f7f\u5f97\u7528\u6237\u53ef\u4ee5\u5feb\u901f\u4e0a\u624b\u5e76\u8fdb\u884c\u7248\u672c\u63a7\u5236\u548c\u534f\u4f5c\u5f00\u53d1\u3002<\/li>\n<li><strong>\u591a\u6570\u636e\u5e93\u540e\u7aef\u652f\u6301<\/strong>\uff1aGogs \u53ef\u4ee5\u4e0e\u591a\u79cd\u5e38\u89c1\u6570\u636e\u5e93\u96c6\u6210\uff0c\u5305\u62ec QLite\u3001MySQL \u548c PostgreSQL \u7b49\uff0c\u4e3a\u7528\u6237\u63d0\u4f9b\u4e86\u66f4\u591a\u7684\u9009\u62e9\uff0c\u4ee5\u9002\u5e94\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u3002<\/li>\n<\/ul>\n<h3>\u5b89\u88c5\u90e8\u7f72<\/h3>\n<p>Gogs \u652f\u6301\u5305\u62ec\u6e90\u7801\u5b89\u88c5\u3001\u4e8c\u8fdb\u5236\u5b89\u88c5\u3001\u5305\u7ba1\u7406\u5b89\u88c5\u3001Docker \u5bb9\u5668\u5b89\u88c5\u7b49\u5728\u5185\u7684\u591a\u79cd\u5b89\u88c5\u90e8\u7f72\u65b9\u5f0f\u3002<\/p>\n<p>\u4ee5 Docker \u5b89\u88c5\u90e8\u7f72\u65b9\u5f0f\u4e3a\u4f8b\uff0c\u51e0\u884c\u547d\u4ee4\u5c31\u53ef\u4ee5\u5feb\u901f\u62c9\u8d77 Gogs \u670d\u52a1\u3002<\/p>\n<pre><code>$ docker pull gogs\/gogs\n\n$ mkdir -p \/var\/gogs\n\n$ docker run --name=gogs -p 10022:22 -p 10880:3000 -v \/var\/gogs:\/data gogs\/gogs\n\n$ docker start gogs<\/code><\/pre>\n<h3>\u5f00\u6e90\u5730\u5740<\/h3>\n<ul>\n<li>github.com\/gogs\/gogs<\/li>\n<\/ul>\n<h2>Gitea<\/h2>\n<p>Gitea \u540c\u6837\u662f\u4e00\u6b3e\u57fa\u4e8e Go \u8bed\u8a00\u5f00\u53d1\u7684\u5f00\u6e90\u81ea\u6258\u7ba1 Git \u670d\u52a1\uff0c\u5b83\u8d77\u6e90\u4e8e Gogs \u9879\u76ee\u7684\u4e00\u4e2a\u5206\u652f\uff0c\u5e76\u81f4\u529b\u4e8e\u63d0\u4f9b\u4e00\u4e2a\u66f4\u52a0\u7075\u6d3b\u3001\u7a33\u5b9a\u548c\u529f\u80fd\u4e30\u5bcc\u7684\u81ea\u5efa Git \u670d\u52a1\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092222\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>Gitea \u7684\u5f00\u53d1\u4e00\u76f4\u7531\u793e\u533a\u7684\u5fd7\u613f\u8005\u8d21\u732e\u4ee3\u7801\u548c\u7ef4\u62a4\uff0c\u56e0\u6b64\u5b83\u6210\u4e3a\u4e86\u4e00\u4e2a\u53d7\u6b22\u8fce\u7684\u5f00\u6e90\u9879\u76ee\uff0c\u5e76\u5728\u5f00\u6e90\u793e\u533a\u4e2d\u5f97\u5230\u4e86\u5e7f\u6cdb\u7684\u5e94\u7528\u548c\u8ba4\u53ef\u3002<\/p>\n<p>Gitea \u63d0\u4f9b\u4e86\u4e00\u4e2a\u5b8c\u6574\u7684\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u548c\u534f\u4f5c\u5f00\u53d1\u5de5\u5177\uff0c\u4f7f\u5f97\u56e2\u961f\u80fd\u591f\u8f7b\u677e\u5730\u6258\u7ba1\u3001\u7ba1\u7406\u548c\u534f\u4f5c\u5f00\u53d1\u9879\u76ee\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092223\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h3>\u4e3b\u8981\u7279\u6027<\/h3>\n<ul>\n<li><strong>\u8f7b\u91cf\u9ad8\u6548<\/strong>\uff1aGitea \u4ee5\u5176\u8f7b\u91cf\u7ea7\u8bbe\u8ba1\u800c\u8457\u79f0\uff0c\u8d44\u6e90\u5360\u7528\u4f4e\uff0c\u9002\u5408\u5728\u8d44\u6e90\u53d7\u9650\u7684\u73af\u5883\u4e2d\u8fd0\u884c\u3002<\/li>\n<li><strong>\u6613\u4e8e\u5b89\u88c5\u4e0e\u90e8\u7f72<\/strong>\uff1aGitea \u63d0\u4f9b\u4e86\u7b80\u5355\u6613\u7528\u7684\u5b89\u88c5\u548c\u90e8\u7f72\u65b9\u5f0f\uff0c\u652f\u6301\u591a\u79cd\u64cd\u4f5c\u7cfb\u7edf\u3002<\/li>\n<li><strong>\u81ea\u6258\u7ba1\u4e0e\u6570\u636e\u638c\u63a7<\/strong>\uff1aGitea \u652f\u6301\u81ea\u6258\u7ba1\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u81ea\u5df1\u7684\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u548c\u7ba1\u7406 Gitea \u5b9e\u4f8b\uff0c\u5b8c\u5168\u638c\u63a7\u81ea\u5df1\u7684\u4ee3\u7801\u548c\u6570\u636e\u3002<\/li>\n<li><strong>\u529f\u80fd\u5168\u9762<\/strong>\uff1a\u5c3d\u7ba1\u662f\u8f7b\u91cf\u7ea7\u7684\u5de5\u5177\uff0cGitea \u4f9d\u7136\u63d0\u4f9b\u4e86\u5305\u62ec\u4ee3\u7801\u4ed3\u5e93\u7ba1\u7406\u3001\u95ee\u9898\u8ddf\u8e2a\u3001\u56e2\u961f\u534f\u4f5c\u7b49\u529f\u80fd\uff0c\u6ee1\u8db3\u5c0f\u578b\u56e2\u961f\u6216\u4e2a\u4eba\u5f00\u53d1\u8005\u7684\u65e5\u5e38\u9700\u6c42\u3002<\/li>\n<li><strong>\u754c\u9762\u7b80\u6d01\u6613\u7528<\/strong>\uff1aGitea \u5177\u6709\u7b80\u5355\u7684\u7528\u6237\u754c\u9762\uff0c\u6613\u4e8e\u4e0a\u624b\u548c\u4f7f\u7528\uff0c\u540c\u65f6\u5b83\u4e5f\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u5b9a\u5236\u9009\u9879\uff0c\u8ba9\u7528\u6237\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u559c\u597d\u8fdb\u884c\u8c03\u6574\u3002<\/li>\n<li><strong>\u793e\u533a\u652f\u6301<\/strong>\uff1aGitea \u662f\u4e00\u4e2a\u6d3b\u8dc3\u7684\u5f00\u6e90\u9879\u76ee\uff0c\u62e5\u6709\u4e00\u4e2a\u70ed\u60c5\u7684\u793e\u533a\u3002\u7528\u6237\u53ef\u4ee5\u83b7\u5f97\u6765\u81ea\u793e\u533a\u7684\u5e2e\u52a9\u548c\u652f\u6301\uff0c\u5171\u540c\u63a8\u52a8\u9879\u76ee\u7684\u53d1\u5c55\u3002<\/li>\n<\/ul>\n<h3>\u5b89\u88c5\u90e8\u7f72<\/h3>\n<p>Gitea \u7684\u5b89\u88c5\u90e8\u7f72\u4e5f\u975e\u5e38\u7b80\u5355\uff0c\u5373\u53ef\u4ee5\u901a\u8fc7\u4e8c\u8fdb\u5236\u3001\u5b89\u88c5\u5305\u7b49\u65b9\u5f0f\u6765\u5b89\u88c5\u8fd0\u884c\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7 Docker \u5bb9\u5668\u7684\u65b9\u5f0f\u6765\u90e8\u7f72\u8fd0\u884c\u3002<\/p>\n<p>\u5982\u679c\u662f\u4e8c\u8fdb\u5236\u5b89\u88c5\u65b9\u5f0f\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u5b98\u7f51\u4e0b\u8f7d\u5bf9\u5e94\u7684\u5b89\u88c5\u5305\u7136\u540e\u6839\u636e\u5b98\u65b9\u6587\u6863\u7684\u6559\u7a0b\u8fdb\u884c\u5b89\u88c5\u5373\u53ef\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092224\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u800c\u5982\u679c\u662f Docker \u5b89\u88c5\u90e8\u7f72\u65b9\u5f0f\uff0c\u51e0\u884c\u547d\u4ee4\u5c31\u53ef\u4ee5\u5feb\u901f\u62c9\u8d77 Gitea \u670d\u52a1\u3002<\/p>\n<pre><code>docker pull gitea\/gitea\n\ndocker run -d --name=gitea \/\n  -p 3000:3000 \/\n  -p 22:22 \/\n  --restart=always \/\n  --volume=\/your\/gitea\/data:\/data \/\n  gitea\/gitea:latest<\/code><\/pre>\n<h3>\u5f00\u6e90\u5730\u5740<\/h3>\n<ul>\n<li>github.com\/go-gitea\/gitea<\/li>\n<\/ul>\n<h2>Forgejo<\/h2>\n<p>Forgejo \u662f\u4e00\u6b3e\u8f7b\u91cf\u3001\u9ad8\u6027\u80fd\u7684\u81ea\u6258\u7ba1\u8f6f\u4ef6\u5f00\u53d1\u5e73\u53f0\uff0c\u540c\u65f6\u529f\u80fd\u4e5f\u975e\u5e38\u5168\u9762\u5e76\u4e14\u6613\u4e8e\u90e8\u7f72\u4f7f\u7528\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092225\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>Forgejo \u6700\u521d\u8d77\u6e90\u4e8e\u4e8e Gitea \u7684\u4e00\u4e2a\u5206\u652f\uff0c\u5176\u7ee7\u627f\u4e86 Gitea \u7684\u8f7b\u91cf\u7ea7\u8bbe\u8ba1\uff0c\u5e76\u4fdd\u6301\u4e86\u4e0e Gitea \u7c7b\u4f3c\u7684\u529f\u80fd\u3002<\/p>\n<p>Forgejo \u4e0d\u4ec5\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684 Git \u4ed3\u5e93\u7ba1\u7406\u3001\u4ee3\u7801\u5ba1\u67e5\u3001\u95ee\u9898\u8ffd\u8e2a\u3001Wiki \u7b49\u529f\u80fd\uff0c\u8fd8\u66f4\u52a0\u6ce8\u91cd\u793e\u533a\u53d1\u5c55\u548c\u5f00\u6e90\u6027\uff0c\u62e5\u6709\u66f4\u9ad8\u7684\u53ef\u5b9a\u5236\u6027\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092226\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092227\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h3>\u4e3b\u8981\u7279\u6027<\/h3>\n<ul>\n<li><strong>\u8f7b\u91cf\u9ad8\u6548<\/strong>\uff1aForgejo \u4ee5\u7b80\u6d01\u3001\u9ad8\u6548\u8457\u79f0\uff0c\u80fd\u591f\u5728\u4f4e\u914d\u7f6e\u7684\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\uff0c\u9002\u5408\u4e2a\u4eba\u6216\u5c0f\u578b\u56e2\u961f\u4f7f\u7528\u3002<\/li>\n<li><strong>\u6613\u7528\u6027<\/strong>\uff1a\u754c\u9762\u53cb\u597d\uff0c\u5e76\u4e14\u6613\u4e8e\u4e0a\u624b\u548c\u4f7f\u7528\u3002<\/li>\n<li><strong>\u529f\u80fd\u4e30\u5bcc<\/strong>\uff1a\u5c3d\u7ba1 Forgejo \u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u5e73\u53f0\uff0c\u4f46\u5b83\u5e76\u6ca1\u6709\u727a\u7272\u529f\u80fd\u3002\u5b83\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684 Git \u4ed3\u5e93\u7ba1\u7406\u529f\u80fd\uff0c\u652f\u6301\u4ee3\u7801\u5ba1\u67e5\u3001\u95ee\u9898\u8ffd\u8e2a\u3001Wiki \u7b49\uff0c\u6ee1\u8db3\u56e2\u961f\u5728\u8f6f\u4ef6\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u7684\u5927\u90e8\u5206\u9700\u6c42\u3002<\/li>\n<li><strong>\u5f00\u6e90\u548c\u793e\u533a\u652f\u6301<\/strong>\uff1aForgejo \u66f4\u52a0\u6ce8\u91cd\u793e\u533a\u5efa\u8bbe\u548c\u5f00\u6e90\uff0c\u62e5\u6709\u66f4\u9ad8\u7684\u53ef\u5b9a\u5236\u6027\uff0c\u540c\u65f6 Forgejo \u62e5\u6709\u4e00\u4e2a\u6d3b\u8dc3\u7684\u793e\u533a\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u8fd9\u91cc\u5206\u4eab\u7ecf\u9a8c\u3001\u5bfb\u6c42\u5e2e\u52a9\u6216\u53c2\u4e0e\u5f00\u53d1\u3002<\/li>\n<\/ul>\n<h3>\u5b89\u88c5\u90e8\u7f72<\/h3>\n<p>Forgejo \u7684\u5b89\u88c5\u90e8\u7f72\u975e\u5e38\u7b80\u5355\uff0c\u652f\u6301\u4ece\u4e8c\u8fdb\u5236\u6216\u8005 Docker \u7b49\u65b9\u5f0f\u8fdb\u884c\u5b89\u88c5\u90e8\u7f72\u3002<\/p>\n<p>\u5982\u679c\u4ece\u4e8c\u8fdb\u5236\u5b89\u88c5\uff0c\u7528\u6237\u53ef\u4ee5\u4e0b\u8f7d\u5bf9\u5e94\u5e73\u53f0\u7684\u5b89\u88c5\u5305\uff0c\u7136\u540e\u6839\u636e\u5b98\u7f51\u63d0\u4f9b\u7684\u6307\u5357\u8fdb\u884c\u5b89\u88c5\u5373\u53ef\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092228\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u800c\u5982\u679c\u662f Docker \u65b9\u5f0f\uff0c\u5b98\u65b9\u5219\u63d0\u4f9b\u6709\u5bf9\u5e94\u7684\u5bb9\u5668\u955c\u50cf\u53ef\u4f9b\u4f7f\u7528\u3002<\/p>\n<pre><code>docker pull codeberg.org\/forgejo\/forgejo:10.0.0<\/code><\/pre>\n<h3>\u5f00\u6e90\u5730\u5740<\/h3>\n<ul>\n<li>codeberg.org\/forgejo\/forgejo<\/li>\n<\/ul>\n<h2>OneDev<\/h2>\n<p>OneDev \u4e0d\u4ec5\u4ec5\u662f\u4e00\u4e2a Git \u670d\u52a1\u5668\uff0c\u66f4\u53ef\u4ee5\u770b\u6210\u662f\u4e00\u6b3e\u5f3a\u5927\u7684\u5f00\u6e90\u4e00\u4f53\u5316 DevOps \u5e73\u53f0\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092229\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>OneDev \u63d0\u4f9b\u4e86\u5305\u62ec Git \u670d\u52a1\u5668\u3001CI\/CD\u3001\u770b\u677f\u4ee5\u53ca\u9879\u76ee\u7ba1\u7406\u7b49\u5728\u5185\u7684\u591a\u79cd\u529f\u80fd\uff0c\u65e8\u5728\u4e3a\u5f00\u53d1\u56e2\u961f\u63d0\u4f9b\u4e00\u4e2a\u534f\u4f5c\u4e0e\u6548\u7387\u5e76\u5b58\u7684\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092230\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000046092231\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h3>\u4e3b\u8981\u7279\u6027<\/h3>\n<ul>\n<li><strong>\u4e00\u4f53\u5316\u5e73\u53f0<\/strong>\uff1aOneDev \u96c6\u6210\u4e86\u5305\u62ec Git \u7ba1\u7406\u3001CI\/CD\u3001\u770b\u677f\u548c\u9879\u76ee\u7ba1\u7406\u7b49\u5728\u5185\u7684\u591a\u79cd\u529f\u80fd\u6216\u6a21\u5757\uff0c\u51cf\u5c11\u4e86\u5de5\u5177\u95f4\u7684\u5207\u6362\u548c\u96c6\u6210\u6210\u672c\u3002<\/li>\n<li><strong>\u7075\u6d3b\u7684CI\/CD\u6d41\u7a0b<\/strong>\uff1aOneDev \u652f\u6301\u6784\u5efa\u7075\u6d3b\u7684 CI\/CD \u6d41\u7a0b\uff0c\u914d\u5408\u76f4\u89c2\u6613\u61c2\u7684 GUI\u6784\u5efa\u5de5\u5177\uff0c\u4f7f\u5f97\u6301\u7eed\u96c6\u6210\u548c\u6301\u7eed\u4ea4\u4ed8\u53d8\u5f97\u7b80\u5355\u3002<\/li>\n<li><strong>\u654f\u6377\u7684\u9879\u76ee\u7ba1\u7406<\/strong>\uff1aOneDev \u5185\u7f6e\u4e86\u81ea\u52a8\u5316\u7684\u770b\u677f\u548c\u95ee\u9898\u8ddf\u8e2a\uff0c\u53ef\u4ee5\u5e2e\u52a9\u56e2\u961f\u7ec4\u7ec7\u4efb\u52a1\u3001\u8ddf\u8e2a\u8fdb\u5ea6\uff0c\u5e76\u63d0\u4f9b\u81ea\u5b9a\u4e49\u7684\u5de5\u4f5c\u6d41\u7a0b\u548c\u5b57\u6bb5\u3002<\/li>\n<li><strong>\u6613\u7528\u6027\u548c\u6269\u5c55\u6027<\/strong>\uff1aOneDev \u6ce8\u91cd\u7528\u6237\u4f53\u9a8c\uff0c\u63d0\u4f9b\u76f4\u89c2\u53cb\u597d\u7684\u754c\u9762\u548c\u5feb\u6377\u64cd\u4f5c\uff0c\u540c\u65f6\u4e5f\u652f\u6301\u5404\u79cd\u6269\u5c55\u673a\u5236\uff0c\u53ef\u4ee5\u6839\u636e\u4e2a\u4eba\u6216\u56e2\u961f\u7684\u9700\u6c42\u8fdb\u884c\u5b9a\u5236\u548c\u6269\u5c55\u3002<\/li>\n<\/ul>\n<h3>\u5b89\u88c5\u90e8\u7f72<\/h3>\n<p>\u5728 Linux \u6216\u8005 macOS \u73af\u5883\u4e0b\u53ef\u4ee5\u4f7f\u7528 Docker \u6a21\u5f0f\u6765\u5feb\u901f\u90e8\u7f72 OneDev\u3002<\/p>\n<pre><code>docker run --name onedev \/\n  -d --restart always  \/\n  -v &lt;host docker sock&gt;:\/var\/run\/docker.sock  \/\n  -v &lt;data dir&gt;:\/opt\/onedev  \/\n  -p 6610:6610  \/\n  -p 6611:6611  \/\n  1dev\/server<\/code><\/pre>\n<p>\u7b49\u5f85 OneDev \u5bb9\u5668\u542f\u52a8\u8fd0\u884c\u4e4b\u540e\u4fbf\u53ef\u4ee5\u5728 <a href=\"https:\/\/link.segmentfault.com\/?enc=zEBYY7kjKn8JDM%2FuFprEdg%3D%3D.JPnE%2FAZd1OLomeYpKXS3yg%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">http:\/\/IP<\/a>\u5730\u5740:6610 \u5730\u5740\u8fdb\u884c\u8bbf\u95ee\u3002<\/p>\n<h3>\u5f00\u6e90\u5730\u5740<\/h3>\n<ul>\n<li>github.com\/theonedev\/onedev<\/li>\n<\/ul>\n<h2>\u5199\u5728\u6700\u540e<\/h2>\n<p>\u901a\u8fc7\u4e0a\u6587\u7684\u603b\u7ed3\u68b3\u7406\u53ef\u4ee5\u770b\u5230\uff0c\u5176\u5b9e\u5e02\u9762\u4e0a\u80fd\u5e73\u66ff GitLab \u7684\u5f00\u6e90\u8f6f\u4ef6\u6216\u8005\u5f00\u6e90\u9879\u76ee\u8fd8\u662f\u975e\u5e38\u591a\u7684\uff0c\u5e76\u4e14\u5f88\u591a\u90fd\u4f1a\u66f4\u52a0\u8f7b\u91cf\u3001\u9ad8\u6548\u3001\u6613\u7528\u3002<\/p>\n<p>\u8fd8\u5728\u7528 GitLab \u7684\u5c0f\u4f19\u4f34\uff0c\u4e5f\u4e0d\u59a8\u53ef\u4ee5\u8003\u8651\u5207\u6362\u5c1d\u8bd5\u4e00\u4e0b\uff0c\u76f8\u4fe1\u4f1a\u6253\u5f00\u4e00\u4e2a\u65b0\u4e16\u754c\u7684\u5927\u95e8\u3002<\/p>\n<p>\u90a3\u6587\u7ae0\u7684\u6700\u540e\u4e5f\u505a\u4e00\u4e2a\u5c0f\u8c03\u67e5\uff1a<\/p>\n<p><strong>\u5927\u5bb6\u662f\u4f7f\u7528\u7684\u54ea\u6b3e\u5de5\u5177\u6216\u8005\u8f6f\u4ef6\u6765\u642d\u5efa\u7684\u4ee3\u7801\u4ed3\u5e93\u5462\uff1f<\/strong> \u6b22\u8fce\u5927\u5bb6\u5206\u4eab\u4ea4\u6d41\u3002<\/p>\n<blockquote><p>\u6ce8\uff1a\u672c\u6587\u5728GitHub\u5f00\u6e90\u4ed3\u5e93\u300c\u7f16\u7a0b\u4e4b\u8def\u300d <a href=\"https:\/\/link.segmentfault.com\/?enc=0X2QJDM2tq2FmzyBbxLMrg%3D%3D.rFPE2wRC0YzLvFG6XobBSvPU9Nn5vVJYNMGmbD4XMo1P4GCWBMZ5MEOFvpRT%2BsoY\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">https:\/\/github.com\/rd2coding\/Road2Coding<\/a> \u4e2d\u5df2\u7ecf\u6536\u5f55\uff0c\u91cc\u9762\u6709\u6211\u6574\u7406\u76846\u5927\u7f16\u7a0b\u65b9\u5411(\u5c97\u4f4d)\u7684\u81ea\u5b66\u8def\u7ebf+\u77e5\u8bc6\u70b9\u5927\u68b3\u7406\u3001\u9762\u8bd5\u8003\u70b9\u3001\u6211\u7684\u7b80\u5386\u3001\u51e0\u672c\u786c\u6838pdf\u7b14\u8bb0\uff0c\u4ee5\u53ca\u7a0b\u5e8f\u5458\u751f\u6d3b\u548c\u611f\u609f\uff0c\u6b22\u8fcestar\u3002<\/p><\/blockquote>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000046092214\">https:\/\/segmentfault.com\/a\/1190000046092214<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u4e00\u4e2a\u591a\u6708\u524d\uff0cGitLab \u505c\u6b62\u5bf9\u4e2d\u56fd\u533a\u57df\u7528\u6237\u63d0\u4f9b\u670d\u52a1\u7684\u6d88\u606f\u76f8\u4fe1\u5927\u5bb6\u65e9\u5c31\u770b\u5230\u4e86\u5427\u3002 \u73b0\u5728\uff0c\u5f53\u4e2d\u56fd\u533a\u57df\u7684\u7528\u6237 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10020649","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10020649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10020649"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10020649\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10020649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10020649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10020649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}