{"id":28869,"date":"2025-04-20T03:36:11","date_gmt":"2025-04-19T19:36:11","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/28869.html"},"modified":"2025-04-20T03:36:11","modified_gmt":"2025-04-19T19:36:11","slug":"ubuntu-%e4%bd%bf%e7%94%a8-gitlab-%e6%90%ad%e5%bb%ba-git-%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/28869.html","title":{"rendered":"Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668"},"content":{"rendered":"<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\u4e0b\u8f7d\u5b89\u88c5GitLab(\u79bb\u7ebf\u5b89\u88c5)<\/li>\n<li>\u8bbf\u95eeGitLab<\/li>\n<li>GitLab\u5185\u5b58\u4f18\u5316<\/li>\n<li>\u914d\u5408\u672c\u5730Git\u4e0a\u4f20\u4ee3\u7801\u8fdb\u884c\u4f7f\u7528<\/li>\n<li>\u5176\u4ed6\u6587\u7ae0<\/li>\n<\/ul>\n<h2>\u4e0b\u8f7d\u5b89\u88c5GitLab(\u79bb\u7ebf\u5b89\u88c5)<\/h2>\n<li>\u5b98\u7f51\u4e0b\u8f7d\u5305 \u5730\u5740&#xff1a;\u200b\u200bhttps:\/\/packages.gitlab.com\/gitlab\/gitlab-ce\u200b \u6ce8: ubuntu\/focal \u9002\u7528\u4e8e ubuntu20\u7cfb\u5217&#xff0c;ubuntu\/bionic \u9002\u7528\u4e8e ubuntu18 \u7cfb\u5217,\u5982\u4e0b\u56fe: <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419193607-6803fb27183e8.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u5b89\u88c5 \u5c06\u4e0b\u8f7d\u7684gitlab-ce_17.7.0-ce.0_amd64.deb\u79bb\u7ebf\u5b89\u88c5\u5305\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u4e0a&#xff0c;\u8fdb\u5165\u6587\u4ef6\u76ee\u5f55&#xff0c;\u5177\u4f53\u64cd\u4f5c\u5982\u56fe&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419193607-6803fb27c387c.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5&#xff1a;<span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> .\/gitlab-ce_17.7.0-ce.0_amd64.deb<br \/>\n \u6ce8&#xff1a;.\/ \u4e3a\u79bb\u7ebf\u5b89\u88c5\u5305\u6240\u5728\u76ee\u5f55<\/li>\n<li>\u914d\u7f6e \u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u4fee\u6539\u914d\u7f6e\u6587\u4ef6gitlab.rb&#xff1a;<span class=\"token function\">sudo<\/span> <span class=\"token function\">vim<\/span> \/etc\/gitlab\/gitlab.rb<br \/>\n \u5982\u4e0b\u56fe&#xff0c;\u5c06\u6ce8\u91ca\u6389\u7684# external_url \u2018http:\/\/gitlab.example.com\u2019&#xff0c;\u4fee\u6539\u4e3a\u670d\u52a1\u5668ip\u6216\u57df\u540d&#xff0c;\u5e76\u6dfb\u52a0\u4e00\u884c\u8bbe\u7f6e\u672a\u5360\u7528\u5e76\u5f00\u653e\u7684\u7aef\u53e3&#xff0c;\u4fee\u6539\u5b8c\u6210\u540e\u4fdd\u5b58\u9000\u51fa\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419193608-6803fb28353bf.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u7aef\u53e3\u8bbe\u7f6e\u547d\u4ee4&#xff1a;nginx<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;listen_port&#039;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">8001<\/span>\n <\/li>\n<li>\u91cd\u65b0\u8f7d\u5165\u914d\u7f6e\u6587\u4ef6<span class=\"token builtin class-name\">cd<\/span> \/opt\/gitlab\/bin\/<br \/>\n<span class=\"token function\">sudo<\/span> gitlab-ctl reconfigure\n <\/li>\n<li>\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f<span class=\"token function\">sudo<\/span> systemctl <span class=\"token builtin class-name\">enable<\/span> gitlab-runsvdir.service\n <\/li>\n<li>\u67e5\u770bGitLab\u72b6\u6001<span class=\"token function\">sudo<\/span> gitlab-ctl status<br \/>\n \u8f93\u51fa\u4ee5\u4e0b\u4fe1\u606f\u8bf4\u660eGitLab\u5df2\u7ecf\u6b63\u5e38\u542f\u52a8&#xff0c;run: alertmanager: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">15210<\/span><span class=\"token punctuation\">)<\/span> 1815s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">15040<\/span><span class=\"token punctuation\">)<\/span> 1853s<br \/>\nrun: gitaly: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">13959<\/span><span class=\"token punctuation\">)<\/span> 2039s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">13981<\/span><span class=\"token punctuation\">)<\/span> 2038s<br \/>\nrun: gitlab-exporter: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14479<\/span><span class=\"token punctuation\">)<\/span> 1949s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14483<\/span><span class=\"token punctuation\">)<\/span> 1948s<br \/>\nrun: gitlab-kas: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">15178<\/span><span class=\"token punctuation\">)<\/span> 1816s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14219<\/span><span class=\"token punctuation\">)<\/span> 2024s<br \/>\nrun: gitlab-workhorse: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14352<\/span><span class=\"token punctuation\">)<\/span> 1966s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14333<\/span><span class=\"token punctuation\">)<\/span> 1967s<br \/>\nrun: logrotate: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">13903<\/span><span class=\"token punctuation\">)<\/span> 2051s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">13911<\/span><span class=\"token punctuation\">)<\/span> 2050s<br \/>\nrun: nginx: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">15188<\/span><span class=\"token punctuation\">)<\/span> 1816s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14421<\/span><span class=\"token punctuation\">)<\/span> 1959s<br \/>\nrun: node-exporter: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14424<\/span><span class=\"token punctuation\">)<\/span> 1955s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14432<\/span><span class=\"token punctuation\">)<\/span> 1954s<br \/>\nrun: postgres-exporter: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">15219<\/span><span class=\"token punctuation\">)<\/span> 1814s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">15052<\/span><span class=\"token punctuation\">)<\/span> 1849s<br \/>\nrun: postgresql: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14029<\/span><span class=\"token punctuation\">)<\/span> 2033s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14114<\/span><span class=\"token punctuation\">)<\/span> 2030s<br \/>\nrun: prometheus: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14540<\/span><span class=\"token punctuation\">)<\/span> 1937s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14539<\/span><span class=\"token punctuation\">)<\/span> 1937s<br \/>\nrun: puma: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">15102<\/span><span class=\"token punctuation\">)<\/span> 1838s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14273<\/span><span class=\"token punctuation\">)<\/span> 1976s<br \/>\nrun: redis: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">13938<\/span><span class=\"token punctuation\">)<\/span> 2045s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">13947<\/span><span class=\"token punctuation\">)<\/span> 2044s<br \/>\nrun: redis-exporter: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14521<\/span><span class=\"token punctuation\">)<\/span> 1943s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14532<\/span><span class=\"token punctuation\">)<\/span> 1942s<br \/>\nrun: sidekiq: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">15066<\/span><span class=\"token punctuation\">)<\/span> 1845s<span class=\"token punctuation\">;<\/span> run: log: <span class=\"token punctuation\">(<\/span>pid <span class=\"token number\">14307<\/span><span class=\"token punctuation\">)<\/span> 1971s\n <\/li>\n<h2>\u8bbf\u95eeGitLab<\/h2>\n<li>\u8bbf\u95ee\u914d\u7f6e\u7684 \u57df\u540d\u6216ip &#043; \u7aef\u53e3&#xff0c;\u5982\u56fe&#xff0c;\u5219\u8bbf\u95ee\u6210\u529f&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419193608-6803fb286d984.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u83b7\u53d6root\u7684\u521d\u59cb\u5bc6\u7801<span class=\"token function\">cat<\/span> \/etc\/gitlab\/initial_root_password<br \/>\n \u5982\u56fe&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419193609-6803fb292136e.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u767b\u5f55\u540e\u4fee\u6539\u521d\u59cb\u5bc6\u7801&#xff0c;\u5982\u56fe&#xff0c;\u4e0d\u540c\u7248\u672c\u9875\u9762\u7ed3\u6784\u4e0d\u540c&#xff0c;\u627e\u5230\u5934\u50cf&#xff08;\u53ef\u80fd\u662f\u52a0\u8f7d\u5931\u8d25\u7684\u56fe\u6807&#xff0c;\u4e5f\u53ef\u80fd\u662f\u7a7a\u767d&#xff09;\u70b9\u51fb\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419193609-6803fb2967c4c.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<li>\u7b80\u4f53\u4e2d\u6587\u7684\u8bbe\u7f6e&#xff0c;\u9009\u62e9\u7b80\u4f53\u4e2d\u6587&#xff0c;\u8bbe\u7f6e\u597d\u540e\u4e0b\u62c9\u5230\u5e95&#xff0c;\u70b9\u51fb\u4fdd\u5b58\u66f4\u6539&#xff0c;\u7136\u540e\u5237\u65b0\u9875\u9762\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419193610-6803fb2a0eb02.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/li>\n<h2>GitLab\u5185\u5b58\u4f18\u5316<\/h2>\n<p>\u76ee\u7684&#xff1a;\u4fee\u6539GitLab\u7684\u914d\u7f6e&#xff0c;\u51cf\u5c11\u5185\u5b58\u5360\u7528\u3002<\/p>\n<li>\n<p>\u6267\u884c\u547d\u4ee4\u8fdb\u5165\u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p> <span class=\"token function\">sudo<\/span> <span class=\"token function\">vim<\/span> \/etc\/gitlab\/gitlab.rb\n <\/li>\n<li>\n<p>\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9&#xff0c;\u6dfb\u52a0\u4f4d\u7f6e\u968f\u610f&#xff0c;\u53ef\u6dfb\u52a0\u5728\u8bbe\u7f6e\u7aef\u53e3\u884c\u4e0b\u9762&#xff0c;\u6dfb\u52a0\u5b8c\u6210\u4fdd\u5b58\u9000\u51fa\u3002<\/p>\n<p> <span class=\"token comment\"># \u51cf\u5c11\u6570\u636e\u5e93\u7f13\u5b58<\/span><br \/>\npostgresql<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;shared_buffers&#039;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;64MB&#034;<\/span><br \/>\n<span class=\"token comment\"># \u51cf\u5c11\u6570\u636e\u5e93\u5e76\u53d1\u6570<\/span><br \/>\npostgresql<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;max_worker_processes&#039;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">4<\/span><br \/>\n<span class=\"token comment\"># \u7981\u7528puma cluster\u6a21\u5f0f&#xff0c;\u53ef\u4ee5\u51cf\u5c11100-400MB\u5360\u7528<\/span><br \/>\npuma<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;worker_processes&#039;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><br \/>\n<span class=\"token comment\"># \u51cf\u5c11sidekiq\u5e76\u53d1\u6570<\/span><br \/>\n<span class=\"token comment\"># sidekiq[&#039;concurrency&#039;] &#061; 2<\/span><br \/>\nsidekiq<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;max_concurrency&#039;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">2<\/span><br \/>\n<span class=\"token comment\"># \u7981\u7528\u76d1\u63a7<\/span><br \/>\nprometheus_monitoring<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;enable&#039;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">false<\/span><br \/>\n<span class=\"token comment\"># \u51cf\u5c11gitlab_rails\u7ec4\u4ef6\u7684\u5185\u5b58\u6d88\u8017<\/span><br \/>\ngitlab_rails<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;env&#039;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string\">&#039;MALLOC_CONF&#039;<\/span> <span class=\"token operator\">&#061;<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#039;dirty_decay_ms:500,muzzy_decay_ms:500&#039;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span>\n <\/li>\n<li>\n<p>\u91cd\u8f7d\u914d\u7f6e\u6587\u4ef6\u5e76\u91cd\u542f<\/p>\n<p> <span class=\"token comment\"># \u8fdb\u5165\u76ee\u5f55<\/span><br \/>\n<span class=\"token builtin class-name\">cd<\/span> \/opt\/gitlab\/bin\/<br \/>\n<span class=\"token comment\"># \u91cd\u8f7d\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">sudo<\/span> gitlab-ctl reconfigure<br \/>\n<span class=\"token comment\"># \u91cd\u542f<\/span><br \/>\n<span class=\"token function\">sudo<\/span> gitlab-ctl restart\n <\/li>\n<li>\n<p>\u67e5\u770b\u5185\u5b58\u5360\u7528<\/p>\n<p> <span class=\"token function\">htop<\/span><\/p>\n<p>\u6ce8&#xff1a;\u670d\u52a1\u56684G\u7684\u5185\u5b58\u5360\u75282.3G\u5de6\u53f3&#xff0c;\u80fd\u4fdd\u8bc1\u6d41\u7545\u8fd0\u884c\u3002\u672a\u914d\u7f6e\u4e4b\u524d\u76f4\u63a5\u5403\u6ee1\u3002<\/p>\n<\/li>\n<h2>\u914d\u5408\u672c\u5730Git\u4e0a\u4f20\u4ee3\u7801\u8fdb\u884c\u4f7f\u7528<\/h2>\n<p>Git \u57fa\u7840\u4f7f\u7528\u547d\u4ee4<\/p>\n<h2>\u5176\u4ed6\u6587\u7ae0<\/h2>\n<p>Ubuntu \u5f00\u901a\u5e76\u8bbe\u7f6e SSH \u8fde\u63a5\u65b9\u5f0f Ubuntu \u5b89\u88c5\u914d\u7f6eMySQL\u3001Python\u3001Nginx Ubuntu\u7cfb\u7edf\u4e2d\u4f7f\u7528 cron \u5b9a\u65f6\u4efb\u52a1\u8bbe\u7f6e\u5b9a\u65f6\u4efb\u52a1\u8c03\u7528python\u6587\u4ef6<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e35\u6b21\uff0c\u6536\u85cf29\u6b21\u3002Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668_ubuntu gitlab\u670d\u52a1\u5668\u9650\u5236\u4f7f\u7528\u5185\u5b58\u5927\u5c0f<\/p>\n","protected":false},"author":2,"featured_media":28862,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[89,273,103,43,726],"topic":[],"class_list":["post-28869","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-git","tag-gitlab","tag-ubuntu","tag-43","tag-726"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/28869.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e35\u6b21\uff0c\u6536\u85cf29\u6b21\u3002Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668_ubuntu gitlab\u670d\u52a1\u5668\u9650\u5236\u4f7f\u7528\u5185\u5b58\u5927\u5c0f\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/28869.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-19T19:36:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419193607-6803fb27183e8.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/28869.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/28869.html\",\"name\":\"Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-19T19:36:11+00:00\",\"dateModified\":\"2025-04-19T19:36:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/28869.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/28869.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/28869.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/28869.html","og_locale":"zh_CN","og_type":"article","og_title":"Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e35\u6b21\uff0c\u6536\u85cf29\u6b21\u3002Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668_ubuntu gitlab\u670d\u52a1\u5668\u9650\u5236\u4f7f\u7528\u5185\u5b58\u5927\u5c0f","og_url":"https:\/\/www.wsisp.com\/helps\/28869.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-19T19:36:11+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419193607-6803fb27183e8.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/28869.html","url":"https:\/\/www.wsisp.com\/helps\/28869.html","name":"Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-19T19:36:11+00:00","dateModified":"2025-04-19T19:36:11+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/28869.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/28869.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/28869.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Ubuntu \u4f7f\u7528 GitLab \u642d\u5efa Git \u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/28869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=28869"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/28869\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/28862"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=28869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=28869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=28869"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=28869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}