{"id":362,"date":"2020-05-20T12:23:17","date_gmt":"2020-05-20T03:23:17","guid":{"rendered":"https:\/\/beanhouse.dip.jp\/wordpress\/?p=362"},"modified":"2020-07-29T14:34:24","modified_gmt":"2020-07-29T05:34:24","slug":"install-git-on-centos-8","status":"publish","type":"post","link":"https:\/\/beanhouse.org\/wordpress\/?p=362","title":{"rendered":"\u3010\u5099\u5fd8\u9332\u3011CentOS8\u306bGit\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u624b\u9806"},"content":{"rendered":"<p class=\"wpwc-reading-time\">\u3053\u306e\u8a18\u4e8b\u306f\u3060\u3044\u305f\u3044 2 \u5206\u307b\u3069\u3067\u8aad\u3081\u307e\u3059\u3002<\/p>\n<p>\u30c6\u30b9\u30c8\u7528\u306e\u30b5\u30fc\u30d0\u30fc[CentOS8]\u306bgit\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u5099\u5fd8\u9332\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/beanhouse.org\/wordpress\/wp-content\/uploads\/2020\/05\/locker-4558667_1920-1024x576.jpg\" alt=\"Repository\" class=\"wp-image-363\" srcset=\"https:\/\/beanhouse.org\/wordpress\/wp-content\/uploads\/2020\/05\/locker-4558667_1920-1024x576.jpg 1024w, https:\/\/beanhouse.org\/wordpress\/wp-content\/uploads\/2020\/05\/locker-4558667_1920-300x169.jpg 300w, https:\/\/beanhouse.org\/wordpress\/wp-content\/uploads\/2020\/05\/locker-4558667_1920-768x432.jpg 768w, https:\/\/beanhouse.org\/wordpress\/wp-content\/uploads\/2020\/05\/locker-4558667_1920-1536x864.jpg 1536w, https:\/\/beanhouse.org\/wordpress\/wp-content\/uploads\/2020\/05\/locker-4558667_1920.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b5\u30fc\u30d0\u30fc\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ cat \/etc\/redhat-release\nCentOS Linux release 8.1.1911 (Core)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h2>\n\n\n\n<p>\u307e\u305a\u306fCentOS\u306bGit\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"enlighter\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># dnf -y install git<\/pre>\n\n\n\n<p>\u7d9a\u3044\u3066git\u5c02\u7528\u306e\u30a2\u30ab\u30a6\u30f3\u30c8[git]\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># useradd git<\/pre>\n\n\n\n<p>git\u5c02\u7528\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># passwd git\n\u30e6\u30fc\u30b6\u30fc git \u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4\u3002\n\u65b0\u3057\u3044\u30d1\u30b9\u30ef\u30fc\u30c9:<\/pre>\n\n\n\n<p>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\/home\/git\u306btest.git\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># cd \/home\/git\/\n# mkdir test.git<\/pre>\n\n\n\n<p>\u4f5c\u6210\u3057\u305f\u30ea\u30dd\u30b8\u30c8\u30ea\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6240\u6709\u8005\u3092git\u5c02\u7528\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># cd test.git\n# chown -R git:git .\/<\/pre>\n\n\n\n<p>\u5171\u6709\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u30b0\u30eb\u30fc\u30d7\u6a29\u9650\u3092\u30e6\u30fc\u30b6\u30fc\u306b\u4ed8\u4e0e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306fcentos\u3068\u3044\u3046\u30e6\u30fc\u30b6\u30fc\u306b\u4ed8\u4e0e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># gpasswd -a centos git<\/pre>\n\n\n\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># git init --bare --shared\nInitialized empty shared Git repository in \/home\/git\/test.git\/<\/pre>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u63a5\u7d9a\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u78ba\u8a8d\u7528\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306fVSCode\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u78ba\u8a8d<\/h2>\n\n\n\n<p>VSCode\u3092\u8d77\u52d5\u3057\u3066Clone\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p>VSCode\u3092\u8d77\u52d5\u3057\u305f\u3089\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u8d77\u52d5\u3057\u3066PowerShell\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u30ea\u30dd\u30b8\u30c8\u30ea[test.git]\u306bcentos\u30e6\u30fc\u30b6\u30fc\u3067\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git clone centos@192.168.1.101:\/home\/git\/test.git test Cloning into 'test'...\ncentos@192.168.1.101's password:\nwarning: You appear to have cloned an empty repository.<\/pre>\n\n\n\n<p>\u3061\u3083\u3093\u3068Clone\u3067\u304d\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>VSCode\u306e\u6a19\u6e96\u6a5f\u80fd\u3068\u3057\u3066Git\u306e\u30bd\u30fc\u30b9\u7ba1\u7406\u6a5f\u80fd\u304c\u3042\u3063\u305f\u306e\u3067\u3068\u308a\u3042\u3048\u305a\u4f7f\u3048\u308b\u74b0\u5883\u304c\u6b32\u3057\u304b\u3063\u305f\u306e\u3067CentOS8\u306bGit\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u304a\u308f\u308a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306f\u3060\u3044\u305f\u3044 2 \u5206\u307b\u3069\u3067\u8aad\u3081\u307e\u3059\u3002 \u30c6\u30b9\u30c8\u7528\u306e\u30b5\u30fc\u30d0\u30fc[CentOS8]\u306bgit\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002 \u305d\u306e\u5099\u5fd8\u9332\u3067\u3059\u3002 \u30b5\u30fc\u30d0\u30fc\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831 $ cat \/etc\/redhat-r &#8230; <\/p>\n","protected":false},"author":1,"featured_media":363,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[76,77,62,80],"class_list":["post-362","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","tag-centos8","tag-git","tag-vscode","tag-memorandum"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/beanhouse.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beanhouse.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beanhouse.org\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beanhouse.org\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beanhouse.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=362"}],"version-history":[{"count":13,"href":"https:\/\/beanhouse.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/362\/revisions"}],"predecessor-version":[{"id":2161,"href":"https:\/\/beanhouse.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/362\/revisions\/2161"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/beanhouse.org\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/363"}],"wp:attachment":[{"href":"https:\/\/beanhouse.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beanhouse.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beanhouse.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}