{"id":1431,"date":"2026-03-18T19:18:48","date_gmt":"2026-03-18T11:18:48","guid":{"rendered":"https:\/\/imuslab.com\/wordpress\/?p=1431"},"modified":"2026-03-18T19:18:48","modified_gmt":"2026-03-18T11:18:48","slug":"go-build-%e5%87%ba%e7%8f%be-error-obtaining-vcs-status","status":"publish","type":"post","link":"https:\/\/imuslab.com\/wordpress\/2026\/03\/18\/go-build-%e5%87%ba%e7%8f%be-error-obtaining-vcs-status\/","title":{"rendered":"go build \u51fa\u73fe error obtaining VCS status"},"content":{"rendered":"\n<p>\u6700\u8fd1\u6211\u5728\u7528 Golang \u958b\u767c\u786c\u9ad4\u76f8\u95dc\u7684\u5c08\u6848 go build \u7684\u6642\u5019\u51fa\u73fe\u4e86\u9019\u500b error\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>error obtaining VCS status: exit status 128 \nUse -buildvcs=false to disable VCS stamping.\n<\/code><\/pre>\n\n\n\n<p>\u9019\u500b\u662f\u56e0\u70ba golang \u7684\u7248\u672c\u63a7\u5236\u51fa\u73fe\u4e86\u554f\u984c\uff0c\u5f8c\u4f86\u767c\u73fe\u662f\u56e0\u70ba\u6211\u5728\u5f9e Windows \u900f\u904e Samba \u5728 Linux \u4e0a\u9032\u884c repo copy \u6642\u6709\u8907\u5236\u5230\u96b1\u85cf\u7684 .git \u8cc7\u6599\u593e\uff0c\u7531\u65bc\u6211\u53ea\u662f\u8981\u505a\u5feb\u901f\u6e2c\u8a66\uff0c\u6240\u4ee5\u6211\u5c31\u5148\u628a .git \u8cc7\u6599\u593e\u522a\u6389\u7136\u5f8c go build \u5c31\u6210\u529f\u4e86\u3002<\/p>\n\n\n\n<p>\u82e5\u4f60\u60f3\u8981\u4fdd\u7559 git history \u7684\u8a71\uff0c\u53ef\u4ee5\u8a66\u8a66\u91cd\u65b0\u5f9e upstream repo \u91cd\u65b0 git clone \u4e00\u6b21\uff0c\u4e0d\u8981\u76f4\u63a5\u900f\u904e SMB \u6216\u662f SFTP \u4e4b\u985e\u7684\u6574\u500b repo folder copy \u5230\u53e6\u4e00\u500b\u958b\u767c\u5e73\u53f0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u6211\u5728\u7528 Golang \u958b\u767c\u786c\u9ad4\u76f8\u95dc\u7684\u5c08\u6848 go build \u7684\u6642\u5019\u51fa\u73fe\u4e86\u9019\u500b error\uff1a \u9019\u500b\u662f\u56e0\u70ba golang \u7684\u7248\u672c\u63a7\u5236\u51fa\u73fe\u4e86\u554f\u984c\uff0c\u5f8c\u4f86\u767c\u73fe\u662f\u56e0\u70ba\u6211\u5728\u5f9e Windows \u900f\u904e Samba \u5728 Linux \u4e0a\u9032\u884c repo copy \u6642\u6709\u8907\u5236\u5230\u96b1\u85cf\u7684 .git \u8cc7\u6599\u593e\uff0c\u7531\u65bc\u6211\u53ea\u662f\u8981\u505a\u5feb\u901f\u6e2c\u8a66\uff0c\u6240\u4ee5\u6211\u5c31\u5148\u628a .git \u8cc7\u6599\u593e\u522a\u6389\u7136\u5f8c go build \u5c31\u6210\u529f\u4e86\u3002 \u82e5\u4f60\u60f3\u8981\u4fdd\u7559 git history \u7684\u8a71\uff0c\u53ef\u4ee5\u8a66\u8a66\u91cd\u65b0\u5f9e upstream repo \u91cd\u65b0 git clone \u4e00\u6b21\uff0c\u4e0d\u8981\u76f4\u63a5\u900f\u904e SMB \u6216\u662f SFTP \u4e4b\u985e\u7684\u6574\u500b repo folder copy \u5230\u53e6\u4e00\u500b\u958b\u767c\u5e73\u53f0\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1431","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/posts\/1431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1431"}],"version-history":[{"count":1,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/posts\/1431\/revisions"}],"predecessor-version":[{"id":1432,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/posts\/1431\/revisions\/1432"}],"wp:attachment":[{"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imuslab.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}