{"id":47975,"date":"2022-10-30T16:44:16","date_gmt":"2022-10-30T08:44:16","guid":{"rendered":"http:\/\/www.xyryd.com\/?p=47975"},"modified":"2022-10-30T16:44:57","modified_gmt":"2022-10-30T08:44:57","slug":"fatal-not-in-a-git-directory-error-command-failed-with-exit-128-git","status":"publish","type":"post","link":"http:\/\/www.xyryd.com\/47975.html","title":{"rendered":"brew install \u65f6\u51fa\u73b0 fatal: not in a git directory Error: Command failed with exit 128: git \u89e3\u51b3\u529e\u6cd5 \u56fe\u6587\u6559\u7a0b"},"content":{"rendered":"\n

fatal: not in a git directory Error: Command failed with exit 128: git
\u6267\u884c\u200b\u200b brew install cmake<\/code>\u200b\u200b \u9047\u5230\u4e86\u4e0b\u9762\u7684\u9519\u8bef<\/p>\n\n\n\n

Already downloaded: \/Users\/kingcall\/Library\/Caches\/Homebrew\/downloads\/b7ef8d6eb909e967d072212c62e71bfb8e94e6227ae2d3567bbabcc561fd9fff–cmake-3.21.4.bottle_manifest.json
==> Downloading http:\/\/ghcr.io\/v2\/homebrew\/core\/cmake\/blobs\/sha256:c86a0bb0e37c293e2d4475519d28f2784c430e871f74969a1a2afeb64b540a7d
Already downloaded: \/Users\/kingcall\/Library\/Caches\/Homebrew\/downloads\/1e8ca69a4444469a3f380baf4e514072d4d0f0b5d5ccd43b8ce3eb68081eff3d–cmake–3.21.4.arm64_monterey.bottle.tar.gz
fatal: not in a git directory
Error: Command failed with exit 128: git
\u89e3\u51b3\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p><\/blockquote>\n\n\n\n

\u6267\u884cbrew -v \u67e5\u770b\u4f1a\u6709\u4e24\u4e2a\u63d0\u793a\uff0c\u63d0\u793a\u7528\u6237\u8bbe\u7f6e \u200b\u200bhomebrew-cask\u200b\u200b\u200b \u548c \u200b\u200bhomebrew-core\u200b\u200b \u7684\u6587\u4ef6\u8def\u5f84\u4e3a\u8bbe\u7f6e\u4e3asafe.directory\uff0c \u5373\u4f7f\u7528\u5982\u4e0b\u547d\u540d\uff1a<\/p>\n\n\n\n

\u6839\u636e\u63d0\u793a\u6267\u884c<\/p>\n\n\n\n

git config --global --add safe.directory \/opt\/homebrew\/Library\/Taps\/homebrew\/homebrew-core
git config --global --add safe.directory \/opt\/homebrew\/Library\/Taps\/homebrew\/homebrew-cask<\/code><\/pre>\n\n\n\n


\u4e4b\u540e\u518d\u6267\u884c \u200b\u200barch -arm64 brew install cocoapods<\/code>\u200b\u200b \u5373\u53ef<\/p>\n\n\n\n

\u5982\u679c\u9047\u5230\u4e0a\u9762\u7684\u9519\u8bef\u5219\u6839\u636e\u63d0\u793a\u6267\u884c<\/p>\n\n\n\n

git config --global --add safe.directory \/opt\/homebrew\/Library\/Taps\/homebrew\/homebrew-services<\/code><\/pre>\n\n\n\n

\u7136\u540e\u518d\u6b21\u6267\u884c\u200b\u200barch -arm64 brew install cocoapods\u200b\u200b<\/code> \u5373\u53ef\u6210\u529f\u3002<\/p>\n\n\n\n

\u6267\u884c\u6210\u529f\u540e\u6211\u4eec\u518d\u6b21\u6267\u884c\u6211\u4eec\u7684\u5b89\u88c5\u547d\u4ee4 \u200b\u200bbrew install cmake<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"

fatal: not in a git directory Error: Command failed wit […]<\/p>\n","protected":false},"author":1,"featured_media":43352,"comment_status":"open","ping_status":"closed","sticky":false,"template":"single-with-sidebar","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[201,36,194],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/posts\/47975"}],"collection":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/comments?post=47975"}],"version-history":[{"count":0,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/posts\/47975\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/media\/43352"}],"wp:attachment":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/media?parent=47975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/categories?post=47975"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/tags?post=47975"}],"curies":[{"name":"wp","href":"http:\/\/api.w.org\/{rel}","templated":true}]}}