﻿{"id":1949,"date":"2020-03-03T11:32:39","date_gmt":"2020-03-03T03:32:39","guid":{"rendered":"http:\/\/jilin.hydesign.tw\/?p=1949"},"modified":"2021-10-23T21:09:46","modified_gmt":"2021-10-23T13:09:46","slug":"git-permission","status":"publish","type":"post","link":"http:\/\/jilin.hydesign.tw\/index.php\/2020\/03\/03\/git-permission\/","title":{"rendered":"Git Permission denied (publickey)"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">1.<strong>\u78ba\u8a8d\u767b\u5165github<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>git config --global user.name \"yourname\"\ngit config --global user.email \"youremail\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2.\u9032\u5165SSH<strong>\u76ee\u9304<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ~\/.ssh\n\n\u81ea\u884c\u5efa\u5275\u76ee\u9304\nmkdir ~\/.ssh<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3.<strong>\u6aa2\u67e5<\/strong>SSH<strong>\u662f\u5426\u9023\u7d50\u5230github.com<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh -T git@github.com<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u300a<strong>\u9023\u7d50\u6210\u529f<\/strong>\u300b<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>> The authenticity of host 'github.com (ip)' can't be established. RSA key fingerprint is......\nAre you sure you want to continue connecting (yes\/no)? yes<\/code><\/pre>\n\n\n\n<p><strong>\u986f\u793a\u91d1\u9470\u5167\u5bb9<\/strong><br>\u5982\u9700\u8981\u66f4\u65b0\u53ef\u62f7\u8c9d\u5167\u5bb9\u8cbc\u5230Gitlab &gt; SSH Keys &gt; Add Key<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat ~\/.ssh\/id_rsa.pub<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u300a<strong>\u9023\u7d50<\/strong>\u5931\u6557\u300b<\/h4>\n\n\n\n<p><strong>\u522a\u9664ssh key<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh-add -D&lt;br>rm -r ~\/.ssh<\/code><\/pre>\n\n\n\n<p><strong>\u5efa\u7acb\u91d1\u9470<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh-keygen -t rsa -C \"youremail\"<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1.\u78ba\u8a8d\u767b\u5165github 2.\u9032\u5165SSH\u76ee\u9304 3.\u6aa2\u67e5SSH\u662f\u5426\u9023\u7d50\u5230github.com \u300a\u9023\u7d50\u6210\u529f\u300b \u986f\u793a&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,4],"tags":[],"class_list":["post-1949","post","type-post","status-publish","format-standard","hentry","category-git","category-notes"],"_links":{"self":[{"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/posts\/1949","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/comments?post=1949"}],"version-history":[{"count":24,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/posts\/1949\/revisions"}],"predecessor-version":[{"id":1990,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/posts\/1949\/revisions\/1990"}],"wp:attachment":[{"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/media?parent=1949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/categories?post=1949"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/jilin.hydesign.tw\/index.php\/wp-json\/wp\/v2\/tags?post=1949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}