﻿{"id":1116,"date":"2013-07-01T11:54:48","date_gmt":"2013-07-01T03:54:48","guid":{"rendered":"http:\/\/nick.txtcc.com\/?p=1116"},"modified":"2013-07-01T11:54:48","modified_gmt":"2013-07-01T03:54:48","slug":"ubuntu%e8%a7%a3%e5%86%b3git-shell-commands-should-exist-and-have-read-and-execute-access","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/linux\/1116","title":{"rendered":"ubuntu\u89e3\u51b3git-shell-commands should exist and have read and execute access."},"content":{"rendered":"<ul>\n    <li># \u5207\u5230 git \u7528\u6236\u6e2c\u8a66<\/li>\n    <li>\u00a0su git<\/li>\n    <li>\n    <li>\u00a0# \u53ef\u80fd\u6703\u8f38\u51fa\u4ee5\u4e0b\u932f\u8aa4<\/li>\n    <li>\u00a0fatal: Interactive git shell is not enabled.<\/li>\n    <li>\u00a0hint: ~\/git-shell-commands should exist and have read and execute access.<\/li>\n    <li>\n    <li>\u00a0# \u89e3\u6c7a\u65b9\u6cd5\u662f\u8907\u88fd git-shell-commands \u76ee\u9304\u5230 git \u7528\u6236\u76ee\u9304<\/li>\n    <li>\u00a0cd \/home\/git<\/li>\n    <li>\u00a0cp -Rf \/usr\/local\/share\/git-core\/contrib\/git-shell-commands .<\/li>\n    <li>\n    <li>\u00a0# \u518d\u4f86\u6539\u8b8a\u6b0a\u9650<\/li>\n    <li>\u00a0chown -R git: git-shell-commands\/<\/li>\n    <li>\u00a0chmod +x git-shell-commands\/help<\/li>\n    <li>\u00a0chmod +x git-shell-commands\/list<\/li>\n    <li>\n    <li>\u00a0# \u627e\u51fa git-shell \u4f4d\u7f6e<\/li>\n    <li>\u00a0which git-shell<\/li>\n    <li>\n    <li>\u00a0# \u4e4b\u5f8c\u4fee\u6539 git \u7528\u6236\u7684 shell \u5230\u525b\u624d\u627e\u51fa\u7684\u4f4d\u7f6e<\/li>\n    <li>\u00a0chsh -s \/usr\/local\/bin\/git-shell git<\/li>\n    <li>\n    <li>\u00a0# \u6ce8\u610f<\/li>\n    <li>\u00a0&#8211; \u6700\u5f8c\u78ba\u4fdd \/home\/git\/.ssh\/authorized_keys \u5167\u7684 key \u662f\u6b63\u78ba<\/li>\n    <li>\u00a0&#8211; \u518d\u6e2c\u8a66\u5728\u81ea\u6a5f\u6e2c\u8a66 clone \u9060\u7aef\u7684 repo,\u61c9\u8a72\u5c31\u4e0d\u9700\u8981\u5bc6\u78bc\u4e86<\/li>\n    <li>\u00a0&#8211; \u4f8b\u5982\u9060\u7aef\u76ee\u9304\u7684\u6a23\u5b50\u662f: \/home\/git\/work\/core.git<\/li>\n    <li>\n    <li>\u00a0git clone git@example.com:work\/core.git<\/li>\n<\/ul>\n<ul>\n<li>See more at: <a href=\"http:\/\/www.actkr.com\/?p=1120#sthash.3P7oyu3U.dpuf\">http:\/\/www.actkr.com\/?p=1120#sthash.3P7oyu3U.dpuf<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<h1>\u5207\u5230 git \u7528\u6236\u6e2c\u8a66 \u00a0su git \u00a0# \u53ef\u80fd\u6703\u8f38\u51fa\u4ee5\u4e0b\u932f\u8aa4 \u00a0fatal: Interactive git shell is not enabled. \u00a0hint: ~\/git-shell-&#46;&#46;&#46;<\/h1>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1116","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=1116"}],"version-history":[{"count":1,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1116\/revisions"}],"predecessor-version":[{"id":1117,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1116\/revisions\/1117"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=1116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=1116"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=1116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}