{"id":19213,"date":"2024-11-19T10:21:50","date_gmt":"2024-11-19T02:21:50","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19213\/"},"modified":"2024-11-19T10:21:50","modified_gmt":"2024-11-19T02:21:50","slug":"gitlab%e9%a1%b5%e9%9d%a2%e6%96%87%e4%bb%b6%e4%b9%b1%e7%a0%81%e6%80%8e%e4%b9%88%e8%a7%a3%e5%86%b3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19213\/","title":{"rendered":"gitlab\u9875\u9762\u6587\u4ef6\u4e71\u7801\u600e\u4e48\u89e3\u51b3"},"content":{"rendered":"<p>\u6700\u8fd1\uff0c\u5f88\u591a\u4f7f\u7528 gitlab \u7684\u7528\u6237\u90fd\u53cd\u5e94\u4e86\u4e00\u4e2a\u95ee\u9898\uff1a\u5728 gitlab \u4e2d\uff0c\u8bbf\u95ee\u9875\u9762\u65f6\uff0c\u65f6\u4e0d\u65f6\u5730\u4f1a\u51fa\u73b0\u9875\u9762\u4e71\u7801\u7684\u60c5\u51b5\uff0c\u8fd9\u7ed9\u7528\u6237\u5e26\u6765\u4e86\u4e00\u5b9a\u7684\u56f0\u6270\u3002\u90a3\u4e48\uff0c\u8fd9\u4e2a\u95ee\u9898\u662f\u5982\u4f55\u4ea7\u751f\u7684\u5462\uff1f\u5982\u4f55\u89e3\u51b3\u5462\uff1f<\/p>\n<ol>\n<li>\u4ea7\u751f\u539f\u56e0<\/li>\n<\/ol>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u77e5\u9053\u8fd9\u4e2a\u95ee\u9898\u4ea7\u751f\u7684\u539f\u56e0\u3002\u5728 GitLab \u4e2d\uff0c\u9875\u9762\u4e71\u7801\u95ee\u9898\u901a\u5e38\u662f\u7531\u4e8e\u6d4f\u89c8\u5668\u89e3\u6790\u9875\u9762\u65f6\u51fa\u73b0\u7f16\u7801\u95ee\u9898\u5f15\u8d77\u7684\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u9875\u9762\u7f16\u7801\u95ee\u9898\u53ef\u80fd\u6709\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\u7684\u539f\u56e0\uff1a<\/p>\n<p>\uff081\uff09\u670d\u52a1\u5668\u7aef\u9875\u9762\u7f16\u7801\u4e0e\u5ba2\u6237\u7aef\u4e0d\u4e00\u81f4\u3002<\/p>\n<p>\uff082\uff09\u9875\u9762\u4e2d\u542b\u6709\u975e UTF-8 \u7f16\u7801\u7684\u5b57\u7b26\u3002<\/p>\n<p>\uff083\uff09\u6d4f\u89c8\u5668\u7f16\u7801\u51fa\u73b0\u95ee\u9898\u3002<\/p>\n<ol>\n<li>\u89e3\u51b3\u65b9\u6cd5<\/li>\n<\/ol>\n<p>\u9488\u5bf9\u4ee5\u4e0a\u95ee\u9898\uff0c\u6211\u4eec\u53ef\u4ee5\u91c7\u53d6\u76f8\u5e94\u7684\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n<p>\uff081\uff09\u68c0\u67e5\u670d\u52a1\u5668\u7684\u9875\u9762\u7f16\u7801\u8bbe\u7f6e\u3002<\/p>\n<p>\u5728 GitLab \u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539 GitLab \u914d\u7f6e\u6587\u4ef6\u7684\u65b9\u5f0f\u6765\u89e3\u51b3\u8be5\u95ee\u9898\u3002\u5177\u4f53\u64cd\u4f5c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>a. \u627e\u5230 GitLab \u914d\u7f6e\u6587\u4ef6 gitlab.yml \u3002<\/p>\n<p>b. \u5728 gitlab.yml \u6587\u4ef6\u4e2d\u641c\u7d22\u5b57\u7b26\u4e32\u201ccharset\u201d\uff0c\u627e\u5230\u8be5\u5b57\u7b26\u4e32\u6240\u5728\u7684\u884c\uff0c\u5e76\u4fee\u6539\u4e3a\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<pre>## Encoding\n##   The application encoding is used for internal data and should not be confused\n##   with the encoding of content served from GitLab to users.\n##   Help: https:\/\/docs.gitlab.com\/ce\/development\/encoding.html\n# encoding: utf-8<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>c. \u4fdd\u5b58\u4fee\u6539\u5e76\u91cd\u65b0\u542f\u52a8 GitLab\u3002<\/p>\n<p>\uff082\uff09\u68c0\u67e5\u9875\u9762\u4e2d\u662f\u5426\u542b\u6709\u975e UTF-8 \u7f16\u7801\u7684\u5b57\u7b26\u3002<\/p>\n<p>\u5982\u679c\u9875\u9762\u4e2d\u542b\u6709\u975e UTF-8 \u7f16\u7801\u7684\u5b57\u7b26\uff0c\u5219\u9700\u8981\u5c06\u5176\u7f16\u7801\u4e3a UTF-8 \u7f16\u7801\u3002\u53ef\u4ee5\u901a\u8fc7\u5de5\u5177\u8fdb\u884c\u8f6c\u6362\uff0c\u6bd4\u5982 Notepad++ \u3002<\/p>\n<p>\uff083\uff09\u68c0\u67e5\u6d4f\u89c8\u5668\u7f16\u7801\u8bbe\u7f6e\u3002<\/p>\n<p>\u5982\u679c\u6d4f\u89c8\u5668\u4e2d\u7684\u7f16\u7801\u8bbe\u7f6e\u51fa\u73b0\u95ee\u9898\uff0c\u5219\u9700\u8981\u8fdb\u884c\u8c03\u6574\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u7684 \u201c\u67e5\u770b -&gt; \u7f16\u7801 \u201d \u83dc\u5355\u6765\u8fdb\u884c\u8bbe\u7f6e\u3002<\/p>\n<ol>\n<li>\u7ed3\u8bed<\/li>\n<\/ol>\n<p>\u603b\u4e4b\uff0c\u5728\u4f7f\u7528 GitLab \u65f6\uff0c\u9047\u5230\u9875\u9762\u4e71\u7801\u95ee\u9898\uff0c\u6211\u4eec\u9700\u8981\u5148\u4e86\u89e3\u5176\u539f\u56e0\uff0c\u7136\u540e\u91c7\u53d6\u76f8\u5e94\u7684\u89e3\u51b3\u65b9\u6cd5\u3002\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6cd5\uff0c\u76f8\u4fe1\u5927\u5bb6\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u8ba9 GitLab \u66f4\u597d\u5730\u670d\u52a1\u4e8e\u6211\u4eec\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fgitlab\u9875\u9762\u6587\u4ef6\u4e71\u7801\u600e\u4e48\u89e3\u51b3\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>\u6700\u8fd1\uff0c\u5f88\u591a\u4f7f\u7528 gitlab \u7684\u7528\u6237\u90fd\u53cd\u5e94\u4e86\u4e00\u4e2a\u95ee\u9898\uff1a\u5728 gitlab \u4e2d\uff0c\u8bbf\u95ee\u9875\u9762\u65f6\uff0c\u65f6\u4e0d\u65f6\u5730\u4f1a\u51fa\u73b0\u9875\u9762\u4e71\u7801\u7684\u60c5\u51b5\uff0c\u8fd9\u7ed9\u7528\u6237\u5e26\u6765\u4e86\u4e00\u5b9a\u7684\u56f0\u6270\u3002\u90a3\u4e48\uff0c\u8fd9\u4e2a\u95ee\u9898\u662f\u5982\u4f55\u4ea7\u751f\u7684\u5462\uff1f\u5982\u4f55\u89e3\u51b3\u5462\uff1f \u4ea7\u751f\u539f\u56e0 \u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u77e5\u9053\u8fd9\u4e2a\u95ee\u9898\u4ea7\u751f\u7684\u539f\u56e0\u3002\u5728 GitLab \u4e2d\uff0c\u9875\u9762\u4e71\u7801\u95ee\u9898\u901a\u5e38\u662f\u7531\u4e8e\u6d4f\u89c8\u5668\u89e3\u6790\u9875\u9762\u65f6\u51fa\u73b0\u7f16\u7801\u95ee\u9898\u5f15\u8d77\u7684\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u9875\u9762\u7f16\u7801\u95ee\u9898\u53ef\u80fd\u6709\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\u7684\u539f\u56e0\uff1a \uff081\uff09\u670d\u52a1\u5668\u7aef\u9875\u9762\u7f16\u7801\u4e0e\u5ba2\u6237\u7aef\u4e0d\u4e00\u81f4\u3002 \uff082\uff09\u9875\u9762\u4e2d\u542b\u6709\u975e UTF-8 \u7f16\u7801\u7684\u5b57\u7b26\u3002 \uff083\uff09\u6d4f\u89c8\u5668\u7f16\u7801\u51fa\u73b0\u95ee\u9898\u3002 \u89e3\u51b3\u65b9\u6cd5 \u9488\u5bf9\u4ee5\u4e0a\u95ee\u9898\uff0c\u6211\u4eec\u53ef\u4ee5\u91c7\u53d6\u76f8\u5e94\u7684\u89e3\u51b3\u65b9\u6cd5\u3002 \uff081\uff09\u68c0\u67e5\u670d\u52a1\u5668\u7684\u9875\u9762\u7f16\u7801\u8bbe\u7f6e\u3002 \u5728 GitLab \u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539 GitLab \u914d\u7f6e\u6587\u4ef6\u7684\u65b9\u5f0f\u6765\u89e3\u51b3\u8be5\u95ee\u9898\u3002\u5177\u4f53\u64cd\u4f5c\u6b65\u9aa4\u5982\u4e0b\uff1a a. \u627e\u5230 GitLab \u914d\u7f6e\u6587\u4ef6 gitlab.yml \u3002 b. \u5728 gitlab.yml \u6587\u4ef6\u4e2d\u641c\u7d22\u5b57\u7b26\u4e32\u201ccharset\u201d\uff0c\u627e\u5230\u8be5\u5b57\u7b26\u4e32\u6240\u5728\u7684\u884c\uff0c\u5e76\u4fee\u6539\u4e3a\u4ee5\u4e0b\u5185\u5bb9\uff1a ## Encoding ## The application encoding is used for internal data and should not be confused ## with the encoding of content served [&hellip;]<\/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-19213","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19213","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=19213"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19213\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}