{"id":5154,"date":"2021-10-09T22:51:45","date_gmt":"2021-10-09T14:51:45","guid":{"rendered":"https:\/\/ixyzero.com\/blog\/?p=5154"},"modified":"2021-10-09T22:51:45","modified_gmt":"2021-10-09T14:51:45","slug":"think%e6%95%b0%e6%8d%ae%e5%ae%89%e5%85%a8%e5%88%86%e6%9e%90%e4%b8%8d%e5%ba%94%e8%af%a5%e6%83%b3%e5%bd%93%e7%84%b6","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/5154.html","title":{"rendered":"[think]\u6570\u636e\u5b89\u5168\u5206\u6790\u4e0d\u5e94\u8be5\u60f3\u5f53\u7136"},"content":{"rendered":"\n<p>=Start=<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u7f18\u7531\uff1a<\/h4>\n\n\n\n<p>\u8d77\u56e0\u662f\u6709\u4e2a\u6570\u636e\u5b89\u5168\u7684case\u6392\u67e5\uff0c\u9700\u8981\u5bf9\u4f01\u4e1a\u5185\u90e8\u7684GitLab\u7cfb\u7edf\u65e5\u5fd7\u505a\u5206\u6790\u540e\u7ed9\u51fa\u662f\u5426\u5b58\u5728\u5f02\u5e38\u7684\u7ed3\u8bba\u3002\u73b0\u5728\u8bb0\u5f55\u4e86\u597d\u51e0\u79cd\u7c7b\u578b\u7684GitLab\u65e5\u5fd7\uff0c\u4f46\u6211\u7b80\u5355\u8bd5\u4e86\u8bd5\u4e4b\u540e\u53d1\u73b0\u80fd\u5bf9\u505a\u5224\u65ad\u6709\u5e2e\u52a9\u7684\u5f53\u524d\u4e3b\u8981\u662f gitlab-shell.log \u8fd9\u4e2a\u65e5\u5fd7\uff0c\u5176\u4e2d\u6709\u4e2a command \u5b57\u6bb5\u7684\u53d6\u503c\u4e3b\u8981\u6709 &#8220;git-upload-pack&#8221; \u548c &#8220;git-receive-pack&#8221; \uff0c\u867d\u7136\u4ece\u82f1\u8bed\u5b57\u9762\u610f\u601d\u4e0a\u80fd\u731c\u4e2a\u5927\u6982\uff0c\u4f46\u4fdd\u9669\u8d77\u89c1\u8fd8\u662f\u5b9e\u9645\u6d4b\u8bd5\u9a8c\u8bc1\u4e00\u4e0b\uff0c\u6700\u540e\u53d1\u73b0\u731c\u60f3\u548c\u5b9e\u9645\u76f8\u53bb\u751a\u8fdc\uff0c\u518d\u7ed3\u5408\u4e4b\u524d\u7684\u4e00\u4e9b\u7ecf\u5386\u548c\u60f3\u6cd5\uff0c\u6240\u4ee5\u7b80\u5355\u95f2\u626f\u51e0\u53e5\u3002<\/p>\n\n\n\n<p>PS\uff1a\u5176\u5b9e\u5f88\u65e9\u5c31\u53d1\u73b0\u7c7b\u4f3c\u7684\u95ee\u9898\u4e86\uff0c\u4f46\u662f\u6211\u597d\u50cf\u5df2\u7ecf\u6162\u6162\u5f00\u59cb\u4e60\u60ef\u8fd9\u4e2a\u73b0\u72b6\u4e86\uff08\u53ef\u80fd\u548c\u4e0d\u540c\u4eba\u7684\u5b9e\u9645\u5de5\u4f5c\u72b6\u6001\u3001\u4e60\u60ef\u6709\u5173\uff0c\u4e0d\u4e00\u5b9a\u662f\u60f3\u8fd9\u6837\uff0c\u4f46\u4f53\u73b0\u5230\u5b9e\u9645\u7ed3\u679c\u4e0a\u786e\u5b9e\u5c31\u662f\u8fd9\u4e48\u4e2a\u60c5\u51b5\uff09\u3002\u8282\u540e\u8fd9\u4e24\u5929\u76f8\u5bf9\u6765\u8bf4\u6ca1\u6709\u90a3\u4e48\u5fd9\uff0c\u53c8\u5c31\u7740\u4e00\u4e2a\u73b0\u6210\u7684\u95ee\u9898\u518d\u7b80\u5355\u8bb0\u5f55\u4e00\u4e0b\uff0c\u65b9\u4fbf\u4ee5\u540e\u56de\u987e\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6b63\u6587\uff1a<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u89e3\u7b54\uff1a<\/h5>\n\n\n\n<p>\u7f51\u4e0a\u6d41\u4f20\u8f83\u5e7f\u7684\u65e5\u5fd7\u5b57\u6bb5\u683c\u5f0f\u8bf4\u660e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gitlab-shell.log\n**\u6ce8\u610f\uff1a\u6b64\u65e5\u5fd7\u53ea\u8bb0\u5f55Gitclone\u534f\u8bae\u7684\u64cd\u4f5c\n\n\u2026\u2026\n\u65e5\u5fd7\u4e2d\u6709\u4ef7\u503c\u7684\u4fe1\u606f\uff1a\n\n* \u540c\u6b65\u52a8\u4f5c\uff1acommand\uff1agitaly-receive-pack\n* \u63a8\u9001\u64cd\u4f5c\uff1acommand\uff1agitaly-upload-pack\n\u2026\u2026<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5b9e\u9645\u6d4b\u8bd5\u60c5\u51b5\u8bb0\u5f55\uff1a<\/p>\n\n\n\n<ul class=\"has-text-color wp-block-list\" style=\"color:#a30003\"><li>git clone\/fetch\/pull \u5728\u540e\u7aefshell-log\u91cc\u9762\u8bb0\u5f55\u7684\u662fcommand\u662f &#8220;git-upload-pack&#8221; \u4e0d\u8981\u88ab\u82f1\u6587\u542b\u4e49\u7ed9\u5e26\u504f\u4e86\u3002<\/li><li>git push \u5728\u540e\u7aefshell-log\u91cc\u9762\u8bb0\u5f55\u7684\u662fcommand\u662f &#8220;git-receive-pack&#8221; \u548cclone\u7684\u542b\u4e49\u521a\u597d\u662f\u53cd\u7684\uff0c\u4e0d\u6ce8\u610f\u7814\u7a76\u8fd8\u771f\u770b\u4e0d\u51fa\u6765\u3002<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<pre class=\"wp-block-preformatted\"># production_json.log\nIt contains a structured log for Rails controller requests received from GitLab\n\n# production.log\nIt contains information about all performed requests\n\n# api_json.log\nIt helps you see requests made directly to the API\n\n# application.log\nIt helps you discover events happening in your instance such as user creation and project removal\n\n# application_json.log\nIt contains the JSON version of the logs in application.log\n\n# gitlab-shell.log\nGitLab Shell is used by GitLab for executing Git commands and provide SSH access to Git repositories.\nUser clone\/fetch activity using SSH transport appears in this log as executing git command &lt;gitaly-upload-pack....<\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u4e2a\u4eba\u89c9\u5f97\u4e00\u4e2a\u6bd4\u8f83\u7406\u60f3\u7684\u6570\u636e\u5b89\u5168\u5206\u6790\u6d41\u7a0b(SOP)\u5927\u6982\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u5148\u6709\u9700\u6c42\uff08\u9700\u6c42\u65b9\u53ef\u4ee5\u662f\u8001\u677f\u3001\u4e1a\u52a1\u65b9\u3001\u5df2\u53d1\u751f\u5f85\u8c03\u67e5\u7684case\u3001\u672a\u53d1\u751f\u4f46\u6839\u636e\u7ecf\u9a8c\u6781\u6709\u53ef\u80fd\u51facase\u7684\u70b9\u2026\u2026\uff09\uff1b<\/li><li>\u518d\u5224\u65ad\u9700\u6c42\u7684\u5408\u7406\u6027\uff0c\u4ee5\u53ca\u53ef\u884c\u7684\u89e3\u51b3\u65b9\u6848\u5217\u8868\uff0c\u9009\u51fa\u5f53\u524d\u6700\u5408\u9002\u7684\u4e00\u4e2a\u65b9\u6848\uff1b<\/li><li>\u65b9\u6848\u5b9a\u4e86\uff0c\u9700\u8981\u5206\u6790\u7684\u65e5\u5fd7\u57fa\u672c\u4e5f\u5c31\u786e\u5b9a\u4e86\uff0c\u5269\u4e0b\u7684\u5c31\u662f\u5bfb\u6c42\u65e5\u5fd7\u7684\u5b98\u65b9\u4ecb\u7ecd\/\u8bf4\u660e\uff08\u5bf9\u4e8e\u5f00\u6e90\u7684\u5e94\u7528\uff0c\u5c31\u662f\u5b98\u65b9\u6587\u6863\/\u751a\u81f3\u662f\u4ee3\u7801\uff1b\u5bf9\u4e8e\u5185\u90e8\u5e94\u7528\uff0c\u5c31\u662f\u5f00\u53d1\u540c\u5b66\u7684\u8bf4\u6cd5\/\u76f8\u5173\u4ee3\u7801\uff09\uff1b<\/li><li>\u5982\u679c\u5df2\u6709\u65e5\u5fd7\u8868\u4e86\uff0c\u90a3\u5c31\u7533\u8bf7\u5bf9\u5e94\u65e5\u5fd7\u8868\u7684\u6743\u9650\uff08\u6ca1\u6709\u7684\u8bdd\u5c31\u518d\u7b49\u7b49\uff09\u770b\u770b\u65e5\u5fd7\u7684\u5927\u81f4\u60c5\u51b5\uff08\u6570\u636e\u91cf\u7ea7\u3001\u8bb0\u5f55\u7684\u64cd\u4f5c\u7c7b\u578b\u3001\u6d89\u53ca\u7528\u6237\u91cf\u7b49\u6982\u51b5\u4fe1\u606f\uff09\uff1b\u540c\u65f6\u4e5f\u8981\u7533\u8bf7\u4e00\u4e2a\u76f8\u5173\u7cfb\u7edf\u7684\u8d26\u53f7\uff0c\u7528\u4e8e\u81ea\u5df1\u767b\u5f55\u4e0a\u53bb\u5b9e\u9645\u770b\u770b\u7cfb\u7edf\u5177\u5907\u7684\u529f\u80fd\uff0c\u719f\u6089\u4e00\u4e0b\u7cfb\u7edf\u7684\u5927\u81f4\u529f\u80fd\uff0c\u540c\u65f6\u7b49\u6709\u65e5\u5fd7\u4e86\u4e5f\u5bf9\u6bd4\u770b\u770b\u4f60\u7684\u64cd\u4f5c\u548c\u5b9e\u9645\u65e5\u5fd7\u8bb0\u5f55\u60c5\u51b5\u662f\u5426\u7b26\u5408\uff0c\u5982\u679c\u76f8\u7b26\u90a3\u5c31\u6700\u597d\uff0c\u5982\u679c\u4e0d\u76f8\u7b26\u5c31\u9700\u8981\u627e\u5f00\u53d1\u8fdb\u4e00\u6b65\u786e\u8ba4\u4e86\u3002<\/li><li>\u5982\u679c\u7b2c4\u6b65\u505a\u7684\u6bd4\u8f83\u597d\u7684\u8bdd\uff0c\u5176\u5b9e\u4e5f\u5c31\u5dee\u4e0d\u591a\u4e86\uff1b\u4f46\u662f\u5f88\u591a\u4eba\u5728\u7b2c4\u6b65\u53ea\u662f\u8d70\u4e86\u4e00\u4e2a\u8fc7\u573a\uff0c\u9886\u5bfc\u95ee\u770b\u5230\u65e5\u5fd7\u6ca1\u6709\uff1fTA\u8bf4\u770b\u5230\u4e86\uff0c\u6709\u65e5\u5fd7\u3002\u9886\u5bfc\u95ee\u65e5\u5fd7\u8bb0\u5f55\u7684\u5168\u4e0d\u5168\uff1fTA\u8bf4\u6bcf\u5929\u7684\u65e5\u5fd7\u91cf\u90fd\u633a\u5927\u7684\uff0c\u5e94\u8be5\u662f\u5168\u7684\uff1f\u4e00\u822c\u7684\u9886\u5bfc\u5e94\u8be5\u4e0d\u4f1a\u518d\u95ee\u4e86\uff0c\u6bd5\u7adf\u518d\u95ee\u4e0b\u53bb\u5c31\u5269\u81ea\u5df1\u52a8\u624b\u505a\u4e86\uff0c\u9886\u5bfc\u81ea\u5df1\u4e8b\u60c5\u4e5f\u591a\uff0c\u6ca1\u529e\u6cd5\u4ec0\u4e48\u90fd\u5e2e\u4f60\u628a\u5173\uff1b\u6700\u6838\u5fc3\u7684\u8fd8\u662f\u4f60\u81ea\u5df1\u8981\u5177\u5907\u4e00\u79cd\u6253\u7834\u7802\u9505\u95ee\u5230\u5e95\u7684\u6c42\u7d22\u7cbe\u795e\uff0c\u4e8b\u60c5\u65e2\u7136\u4ea4\u7ed9\u4f60\u4e86\uff0c\u4f60\u5c31\u6709\u8d23\u4efb\u628a\u4e8b\u60c5\u505a\u597d\uff0c\u4ea4\u4ed8\u4e00\u4e2a\u597d\u7684\u7ed3\u679c\uff0c\u5177\u4f53\u5e94\u8be5\u600e\u4e48\u505a\u5176\u5b83\u4eba\u5e76\u4e0d\u5173\u5fc3\u3002<\/li><\/ol>\n\n\n\n<p>==<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"0\"><li>\u7533\u8bf7\u76f8\u5173\u7cfb\u7edf\u8d26\u53f7\uff0c\u65b9\u4fbf\u5fc5\u8981\u7684\u65f6\u5019\u8fdb\u884c\u6d4b\u8bd5\u548c\u9a8c\u8bc1\uff1b<\/li><li>\u7533\u8bf7\u76f8\u5173\u65e5\u5fd7\u6743\u9650\uff0c\u4e86\u89e3\u65e5\u5fd7\u7684\u5b9e\u9645\u8bb0\u5f55\u60c5\u51b5\uff1b<\/li><li>\u5bf9\u7167\u5b9e\u9645\u6d4b\u8bd5\u64cd\u4f5c\u60c5\u51b5\u68c0\u67e5\u65e5\u5fd7\u8bb0\u5f55\u60c5\u51b5\uff1b #\u4e0d\u8981\u60f3\u5f53\u7136\uff0c\u62ff\u5b9e\u9645\u7ed3\u679c\u8bf4\u8bdd<\/li><li>\u5bf9\u7167\u68c0\u67e5OK\u5219\u901a\u8fc7\uff1b\u5426\u5219\u9700\u8981\u63a8\u52a8\u5f00\u53d1\u8fdb\u884c\u81ea\u67e5\u81ea\u7ea0\uff0c\u76f4\u5230\u5bf9\u7167\u68c0\u67e5\u901a\u8fc7\u4e3a\u6b62\u3002 #\u5728\u5f00\u53d1\u5199\u65e5\u5fd7\u65f6\u4e5f\u8981\u6ce8\u610f\u4e00\u4e0b\u547d\u540d\u548c\u5b9e\u9645\u542b\u4e49\u7684\u533a\u522b\u4e0d\u8981\u592a\u5927\uff0c\u6bd4\u5982\u660e\u660e\u662f\u4e2a\u4e0b\u8f7d\u64cd\u4f5c\uff0c\u65e5\u5fd7\u91cc\u5374\u6709upload\u7684\u5173\u952e\u5b57<\/li><li>\u8fd8\u6709\u5f88\u91cd\u8981\u7684\u4e00\u4e9b\u70b9\uff08\u4f46\u5f88\u591a\u4eba\u90fd\u4f1a\u6f0f\u6389\u7684\uff09\uff1a<br><strong>\u68b3\u7406\u5e76\u5efa\u7acb\u4e00\u4e2a\u65e5\u5fd7\u7edf\u8ba1\u5927\u76d8\uff0c\u7528\u4e8e\u4e86\u89e3\u76f8\u5173\u65e5\u5fd7\u7684\u53d8\u5316\u8d8b\u52bf<\/strong>\uff0c\u65b9\u4fbf\u4e8b\u540e\u5feb\u901f\u5b9a\u4f4d\u95ee\u9898\u53d1\u751f\u65e5\u671f\uff1b #\u4e8b\u51fa\u53cd\u5e38\u5fc5\u6709\u5996\uff0c\u5982\u679c\u6709\u95ee\u9898\uff0c\u5927\u76d8\u7684\u67d0\u4e2a\u8d8b\u52bf\u56fe\u4e2d\u5e94\u8be5\u80fd\u6709\u6240\u4f53\u73b0\uff0c\u5982\u679c\u4e0d\u80fd\u7684\u8bdd\u90a3\u4e2a\u56fe\u53ef\u80fd\u9700\u8981\u91cd\u65b0\u753b\u4e86<br><strong>\u81ea\u52a8\u5b9a\u671f\u62e8\u6d4b\uff0c\u901a\u8fc7\u914d\u7f6e\u544a\u8b66\u5b9e\u73b0\u5f02\u5e38\u5b9e\u65f6\u901a\u77e5\u3002<\/strong> #\u5927\u76d8\u53ea\u6709\u5927\u8d8b\u52bf\uff0c\u62e8\u6d4b\u53ef\u4ee5\u7ec6\u5316\u5230\u5177\u4f53\u63a5\u53e3\/\u529f\u80fd\uff0c\u80fd\u63d0\u4f9b\u767e\u5206\u6bd4\u3001\u5177\u4f53\u65f6\u95f4\u6bb5\u7b49\u66f4\u7ec6\u8282\u7684\u4fe1\u606f<\/li><\/ol>\n\n\n\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u94fe\u63a5\uff1a<\/h5>\n\n\n\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/administration\/logs.html#gitlab-shelllog\">https:\/\/docs.gitlab.com\/ee\/administration\/logs.html#gitlab-shelllog<\/a><\/p>\n\n\n\n<p>gitlab Clone Pull Push \u65e5\u5fd7\u4fe1\u606f<br><a href=\"https:\/\/blog.csdn.net\/wyounger\/article\/details\/110956403\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/blog.csdn.net\/wyounger\/article\/details\/110956403<\/a><\/p>\n\n\n\n<p>\u4e0a\u9762\u90a3\u7bc7\u6587\u7ae0\u7684\u82f1\u6587\u673a\u7ffb\u7248\u672c<br><a href=\"https:\/\/developpaper.com\/gitlab-clone-pull-push-log-information\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developpaper.com\/gitlab-clone-pull-push-log-information\/<\/a> #\u81ea\u52a8\u6293\u53d6\u6587\u7ae0\u5e76\u7ffb\u8bd1\u4e3a\u82f1\u6587\u7684\u4e00\u4e2a\u7f51\u7ad9\uff0c\u770b\u4e0a\u53bb\u597d\u50cf\u8fd8\u884c\uff0c\u4f46\u5176\u5b9e\u4e0d\u884c<\/p>\n\n\n\n<p>git pull \u548c git fetch\u7684\u533a\u522b\uff1f<br><a href=\"https:\/\/www.zhihu.com\/question\/38305012\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.zhihu.com\/question\/38305012<\/a><\/p>\n\n\n\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=Start= \u7f18\u7531\uff1a \u8d77\u56e0\u662f\u6709\u4e2a\u6570\u636e\u5b89\u5168\u7684case\u6392\u67e5\uff0c\u9700\u8981\u5bf9\u4f01\u4e1a\u5185\u90e8\u7684GitLab\u7cfb\u7edf\u65e5\u5fd7\u505a\u5206\u6790\u540e\u7ed9\u51fa\u662f\u5426 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[1764,3,53,1191],"class_list":["post-5154","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","tag-gitlab","tag-log","tag-think","tag-1191"],"views":3933,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=5154"}],"version-history":[{"count":1,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5154\/revisions"}],"predecessor-version":[{"id":5155,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/5154\/revisions\/5155"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=5154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=5154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=5154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}