{"id":22926,"date":"2025-04-19T06:41:46","date_gmt":"2025-04-18T22:41:46","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/22926.html"},"modified":"2025-04-19T06:41:46","modified_gmt":"2025-04-18T22:41:46","slug":"%e5%9c%a8%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e9%85%8d%e7%bd%ae%e5%a4%9a%e4%b8%aagithub-ssh%e5%af%86%e9%92%a5%e5%92%8cgit%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/22926.html","title":{"rendered":"\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u591a\u4e2aGitHub SSH\u5bc6\u94a5\u548cGit\u4f7f\u7528\u6559\u7a0b"},"content":{"rendered":"<p>\u80cc\u666f&#xff1a;<\/p>\n<p>\u4f7f\u7528https clone\u4ed3\u5e93\u540e&#xff0c;\u518d\u8fdb\u884c push \u548c commit \u6bcf\u6b21\u90fd\u8981\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\u975e\u5e38\u7684\u7e41\u7410&#xff0c;\u4f7f\u7528ssh key\u5219\u6bd4\u8f83\u7684\u7b80\u5355\u3002\u4e14\u6709\u4e00\u4e9b\u65f6\u5019\u5b58\u5728\u591a\u4e2a\u4eba\u4f7f\u7528\u540c\u4e00\u4e2a\u8d26\u6237\u7684\u60c5\u51b5&#xff0c;\u56e0\u6b64\u9700\u8981\u5206\u5f00\u5b58\u50a8\u6bcf\u4e2a\u4eba\u7684ssh key\u3002<\/p>\n<h2>\u6b65\u9aa40&#xff1a;\u5b89\u88c5git<\/h2>\n<ul>\n<li>\n<p>Windows: \u4e0b\u8f7d\u5e76\u5b89\u88c5\u00a0Git for Windows\u3002<\/p>\n<\/li>\n<li>\n<p>macOS: \u4f7f\u7528 Homebrew \u5b89\u88c5&#xff1a;brew install git\u3002<\/p>\n<\/li>\n<li>\n<p>Linux: \u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5b89\u88c5&#xff0c;\u4f8b\u5982\u5728 Ubuntu \u4e0a&#xff1a;sudo apt-get install git<\/p>\n<\/li>\n<\/ul>\n<h3>\u6b65\u9aa4 1&#xff1a;\u68c0\u67e5\u662f\u5426\u5df2\u6709 SSH \u5bc6\u94a5<\/h3>\n<p>\u5728\u670d\u52a1\u5668\u4e0a\u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u5b58\u5728 SSH \u5bc6\u94a5&#xff1a;<\/p>\n<p>ls ~\/.ssh <\/p>\n<p>\u5982\u679c\u770b\u5230\u4ee5\u4e0b\u6587\u4ef6&#xff0c;\u8bf4\u660e\u5df2\u7ecf\u5b58\u5728 SSH \u5bc6\u94a5&#xff1a;<\/p>\n<ul>\n<li>\n<p>id_rsa&#xff08;\u79c1\u94a5&#xff09;<\/p>\n<\/li>\n<li>\n<p>id_rsa.pub&#xff08;\u516c\u94a5&#xff09;<\/p>\n<\/li>\n<\/ul>\n<p>\u540e\u9762\u4f60\u53ef\u4ee5\u9009\u62e9\u76f4\u63a5\u4f7f\u7528id_rsa.pub\u4f5c\u4e3a\u4f60\u7684\u516c\u94a5&#xff0c;\u4e5f\u53ef\u4ee5\u91cd\u65b0\u5f00\u4e00\u4e2a\u72ec\u5c5e\u4e8e\u81ea\u5df1\u7684\u516c\u94a5\u3002<\/p>\n<h3>\u6b65\u9aa4 2&#xff1a;\u751f\u6210\u65b0\u7684 SSH \u5bc6\u94a5\u5bf9&#xff08;\u5df2\u7ecf\u6709\u7684\u53ef\u4ee5\u9009\u62e9\u8df3\u8fc7&#xff09;<\/h3>\n<p>ssh-keygen -t rsa -b 4096 -C &#034;your_email&#064;example.com(\u72ec\u7279id\u6807\u8bc6\u7b26)&#034; <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"725\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418224141-6802d525598b1.png\" width=\"1579\" \/><\/p>\n<ul>\n<li>\n<p>\u6309\u63d0\u793a\u9009\u62e9\u4fdd\u5b58\u8def\u5f84&#xff08;\u9ed8\u8ba4\u662f\u00a0\u00a0~\/.ssh\/id_rsa&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u8bbe\u7f6e\u4e00\u4e2a\u5bc6\u7801&#xff08;\u53ef\u9009&#xff0c;\u5982\u679c\u4e0d\u60f3\u8bbe\u7f6e\u5bc6\u7801&#xff0c;\u76f4\u63a5\u6309\u56de\u8f66&#xff09;<\/p>\n<\/li>\n<\/ul>\n<h3>\u6b65\u9aa4 3&#xff1a;\u5c06\u516c\u94a5\u6dfb\u52a0\u5230 GitHub<\/h3>\n<ul>\n<li>\n<p>\u6253\u5f00\u00a0GitHub\u3002<\/p>\n<\/li>\n<li>\n<p>\u70b9\u51fb\u53f3\u4e0a\u89d2\u5934\u50cf&#xff0c;\u9009\u62e9\u00a0Settings\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728\u5de6\u4fa7\u83dc\u5355\u4e2d\u9009\u62e9\u00a0SSH and GPG keys\u3002<\/p>\n<\/li>\n<li>\n<p>\u70b9\u51fb\u00a0New SSH key<\/p>\n<\/li>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1169\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418224141-6802d525daeac.png\" width=\"2559\" \/><\/p>\n<\/li>\n<li>\n<p>s<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1169\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418224143-6802d5270bff9.png\" width=\"2559\" \/><\/p>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u5728\u00a0Title\u00a0\u4e2d\u586b\u5199\u4e00\u4e2a\u63cf\u8ff0&#xff08;\u4f8b\u5982\u00a0Server Key&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728\u00a0Key\u00a0\u4e2d\u7c98\u8d34\u521a\u624d\u590d\u5236\u7684\u516c\u94a5\u5185\u5bb9&#xff08;~\/.ssh\/id_rsa.pub&#xff09;\u3002\u6ce8\u610f\u4e00\u5b9a\u662f.pub\u516c\u94a5\u6587\u4ef6<\/p>\n<\/li>\n<li>\n<p>\u70b9\u51fb\u00a0Add SSH key\u3002<\/p>\n<\/li>\n<\/ul>\n<h3>\u6b65\u9aa4 4&#xff1a;\u6d4b\u8bd5 SSH \u8fde\u63a5\u00a0<\/h3>\n<p>\u5728\u670d\u52a1\u5668\u4e0a\u6d4b\u8bd5\u662f\u5426\u53ef\u4ee5\u901a\u8fc7 SSH \u8fde\u63a5\u5230 GitHub&#xff1a;<\/p>\n<p>ssh -T git&#064;github.com <\/p>\n<p>\u770b\u5230\u8fd9\u6837\u7684\u6587\u5b57\u5c31\u8bf4\u660e\u6210\u529f\u5566<\/p>\n<p>Hi taichiXD! You&#039;ve successfully authenticated, but GitHub does not provide shell access. <\/p>\n<p>\u4f46\u662f\u6709\u7684\u65f6\u5019\u4f1a\u51fa\u73b0\u8fd9\u6837\u7684\u95ee\u9898<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"191\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418224144-6802d5282dc88.png\" width=\"1347\" \/><\/p>\n<p>\u00a0\u8fd9\u4e2a\u65f6\u5019\u9700\u8981\u7528 sudo \u6743\u9650\u8fd0\u884c ssh -T \u7684\u547d\u4ee4<\/p>\n<h3>\u6b65\u9aa4 5&#xff1a;\u591a\u5bc6\u94a5\u7ba1\u7406&#xff08;\u5355\u7528\u6237\u53ef\u5ffd\u7565&#xff09;<\/h3>\n<p>\u5982\u679c\u670d\u52a1\u5668\u4e0a\u5df2\u7ecf\u6709\u5176\u4ed6 SSH \u5bc6\u94a5&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u7f16\u8f91\u00a0~\/.ssh\/config\u00a0\u6587\u4ef6&#xff08;\u5982\u679c\u6ca1\u6709\u9700\u8981\u5b9e\u73b0\u521b\u5efacd ~\/.ssh; touch config; chmod 711 config&#xff09;\u6765\u7ba1\u7406\u591a\u4e2a\u5bc6\u94a5\u3002\u4f8b\u5982&#xff1a;<\/p>\n<p>Host github-taichi<br \/>\n    HostName github.com<br \/>\n    User git<br \/>\n    IdentityFile ~\/.ssh\/git_rsa <\/p>\n<p>\u8fd9\u65f6\u5019\u8fd0\u884c&#xff08;\u8981\u8bb0\u5f97\u66ff\u6362Host\u7684\u540d\u79f0&#xff09;<\/p>\n<p>ssh -T git&#064;github-taichi <\/p>\n<p>\u53ef\u4ee5\u770b\u5230\u6b22\u8fce\u7684\u6587\u5b57&#xff0c;\u68c0\u67e5\u662f\u4e0d\u662f\u81ea\u5df1\u7684\u7528\u6237\u540d\u5373\u53ef\u3002<\/p>\n<h3>\u6b65\u9aa4 6&#xff1a;clone git \u7aef\u7684\u79c1\u6709\u4ed3\u5e93<\/h3>\n<h4>1. \u672c\u5730\u521d\u59cb\u5316\u4ed3\u5e93<\/h4>\n<p>\u00a0 \u00a0 \u00a0\u521b\u5efa\u4e00\u4e2a\u65b0\u6587\u4ef6\u5939(mkdir &lt;\u540d\u5b57&gt;)<\/p>\n<p>\u00a0 \u00a0 \u00a0cd \u5230\u6587\u4ef6\u5939\u7684\u76ee\u5f55\u4e0b\u9762<\/p>\n<p>\u6267\u884c&#xff1a;<\/p>\n<p>git init <\/p>\n<p>\u770b\u5230\u4e0b\u9762\u7684\u7ed3\u679c\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"83\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418224144-6802d5285a979.png\" width=\"2235\" \/><\/p>\n<h4>2. \u8bbe\u7f6e\u8fdc\u7a0b\u7684\u4ed3\u5e93<\/h4>\n<p>\u6ce8\u610f\u8fd9\u91cc\u8981\u628a\u539f\u6765\u7684git&#064;github.com\u66f4\u6362\u6210git&#064;(\u6b65\u9aa45\u8bbe\u7f6e\u6210\u7684host\u540d\u79f0)<\/p>\n<p>git remote add origin git&#064;github-taichi:XOTaichi\/PrivacyEncrypt.git <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1169\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418224144-6802d52889608.png\" width=\"2559\" \/><\/p>\n<p>\u5982\u679c\u8bbe\u7f6e\u9519\u4e86\u60f3\u8981\u4fee\u6539\u5c31\u6267\u884c<\/p>\n<p>git remote set-url origin &lt;\u65b0\u7684\u8fdc\u7a0b\u4ed3\u5e93URL&gt; <\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7<\/p>\n<p>git config &#8211;global user.email &#034;you&#064;example.com&#034;<br \/>\ngit config &#8211;global user.name &#034;Your Name&#034; <\/p>\n<p>\u8bbe\u7f6e\u4ed3\u5e93\u7684\u4e3b\u4eba<\/p>\n<h4>3. \u67e5\u770b\u8fdc\u7a0b\u4ed3\u5e93\u4fe1\u606f<\/h4>\n<p>git remote -v <\/p>\n<h4>4.\u00a0\u5220\u9664\u8fdc\u7a0b\u4ed3\u5e93<\/h4>\n<p>git remote remove origin <\/p>\n<h2>git\u4f7f\u7528\u6559\u7a0b&#xff08;\u6700\u57fa\u672c: add, commit,\u00a0push, pull,\u00a0 merge, fix conflict&#xff09;\u00a0<\/h2>\n<h4>1. \u521d\u59cb\u5316\u4ed3\u5e93<\/h4>\n<p>\u5982\u679c\u4f60\u662f\u4ece\u96f6\u5f00\u59cb&#xff0c;\u9700\u8981\u5148\u521d\u59cb\u5316\u4e00\u4e2a Git \u4ed3\u5e93\u3002<\/p>\n<p>git init <\/p>\n<p>\u8fd9\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u00a0.git\u00a0\u6587\u4ef6\u5939&#xff0c;\u7528\u4e8e\u5b58\u50a8\u7248\u672c\u63a7\u5236\u4fe1\u606f&#xff08;\u540e\u7eed\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7add origin\u8fde\u63a5\u5230\u8fdc\u7a0b\u4ed3\u5e93\u4e0a&#xff0c;\u76f4\u63a5\u8fdb\u884cpull\u540c\u6b65\u64cd\u4f5c&#xff0c;\u548cpush\u66f4\u65b0\u64cd\u4f5c&#xff09;\u3002<\/p>\n<p>\u5982\u679c\u4f60\u8981\u514b\u9686\u4e00\u4e2a\u5df2\u6709\u7684\u8fdc\u7a0b\u4ed3\u5e93&#xff0c;\u53ef\u4ee5\u4f7f\u7528&#xff1a;<\/p>\n<p>git clone &lt;\u4ed3\u5e93URL&gt; <\/p>\n<hr \/>\n<h4>2. \u6dfb\u52a0\u6587\u4ef6\u5230\u6682\u5b58\u533a (git add)<\/h4>\n<p>\u5728\u5de5\u4f5c\u76ee\u5f55\u4e2d\u4fee\u6539\u6587\u4ef6\u540e&#xff0c;\u9700\u8981\u5c06\u6587\u4ef6\u6dfb\u52a0\u5230\u6682\u5b58\u533a&#xff08;Staging Area&#xff09;&#xff0c;\u4ee5\u4fbf\u540e\u7eed\u63d0\u4ea4\u3002<\/p>\n<ul>\n<li>\n<p>\u6dfb\u52a0\u5355\u4e2a\u6587\u4ef6&#xff1a;<\/p>\n<p> git add &lt;\u6587\u4ef6\u540d&gt; <\/li>\n<li>\n<p>\u6dfb\u52a0\u6240\u6709\u4fee\u6539\u7684\u6587\u4ef6&#xff1a;<\/p>\n<p> git add . <\/li>\n<li>\n<p>\u6dfb\u52a0\u7279\u5b9a\u7c7b\u578b\u7684\u6587\u4ef6&#xff08;\u4f8b\u5982\u6240\u6709\u00a0.txt\u00a0\u6587\u4ef6&#xff09;&#xff1a;<\/p>\n<p> git add *.txt <\/li>\n<\/ul>\n<hr \/>\n<h4>3. \u63d0\u4ea4\u66f4\u6539 (git commit)<\/h4>\n<p>\u5c06\u6682\u5b58\u533a\u7684\u6587\u4ef6\u63d0\u4ea4\u5230\u672c\u5730\u4ed3\u5e93&#xff0c;\u5e76\u9644\u4e0a\u63d0\u4ea4\u4fe1\u606f\u3002<\/p>\n<p>git commit -m &#034;\u63d0\u4ea4\u4fe1\u606f&#034; <\/p>\n<p>\u63d0\u4ea4\u4fe1\u606f\u5e94\u7b80\u6d01\u660e\u4e86&#xff0c;\u63cf\u8ff0\u672c\u6b21\u63d0\u4ea4\u7684\u5185\u5bb9\u3002<\/p>\n<hr \/>\n<h4>4. \u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93 (git push)<\/h4>\n<p>\u5c06\u672c\u5730\u4ed3\u5e93\u7684\u63d0\u4ea4\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93&#xff08;\u5982 GitHub\u3001GitLab \u7b49&#xff09;\u3002<\/p>\n<ul>\n<li>\n<p>\u63a8\u9001\u5230\u9ed8\u8ba4\u8fdc\u7a0b\u4ed3\u5e93&#xff08;\u901a\u5e38\u662f\u00a0origin&#xff09;&#xff1a;<\/p>\n<p> git push origin &lt;\u5206\u652f\u540d&gt; <\/li>\n<li>\n<p>\u5982\u679c\u8fdc\u7a0b\u5206\u652f\u4e0d\u5b58\u5728&#xff0c;\u53ef\u4ee5\u521b\u5efa\u5e76\u63a8\u9001&#xff1a;<\/p>\n<p> git push -u origin &lt;\u5206\u652f\u540d&gt; <\/li>\n<\/ul>\n<hr \/>\n<h4>5. \u62c9\u53d6\u8fdc\u7a0b\u4ed3\u5e93\u7684\u66f4\u65b0 (git pull)<\/h4>\n<p>\u4ece\u8fdc\u7a0b\u4ed3\u5e93\u62c9\u53d6\u6700\u65b0\u7684\u66f4\u6539\u5e76\u5408\u5e76\u5230\u672c\u5730\u5206\u652f\u3002<\/p>\n<p>git pull origin &lt;\u5206\u652f\u540d&gt; <\/p>\n<p>git pull\u00a0\u5b9e\u9645\u4e0a\u662f\u00a0git fetch&#xff08;\u83b7\u53d6\u8fdc\u7a0b\u66f4\u65b0&#xff09;\u548c\u00a0git merge&#xff08;\u5408\u5e76\u5230\u672c\u5730\u5206\u652f&#xff09;\u7684\u7ec4\u5408\u3002<\/p>\n<hr \/>\n<h4>6. \u5408\u5e76\u5206\u652f (git merge)<\/h4>\n<p>\u5728\u5f00\u53d1\u4e2d&#xff0c;\u901a\u5e38\u4f1a\u5728\u4e0d\u540c\u7684\u5206\u652f\u4e0a\u5de5\u4f5c\u3002\u5b8c\u6210\u4e00\u4e2a\u529f\u80fd\u540e&#xff0c;\u9700\u8981\u5c06\u5206\u652f\u5408\u5e76\u5230\u4e3b\u5206\u652f\u3002<\/p>\n<ul>\n<li>\n<p>\u5207\u6362\u5230\u76ee\u6807\u5206\u652f&#xff08;\u4f8b\u5982\u00a0main&#xff09;&#xff1a;<\/p>\n<p> git checkout main <\/li>\n<li>\n<p>\u5408\u5e76\u6307\u5b9a\u5206\u652f&#xff08;\u4f8b\u5982\u00a0feature-branch&#xff09;&#xff1a;<\/p>\n<p> git merge feature-branch <\/li>\n<li>\n<p>\u5982\u679c\u5408\u5e76\u6210\u529f&#xff0c;Git \u4f1a\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u63d0\u4ea4\u8bb0\u5f55\u3002<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h4>7. \u89e3\u51b3\u51b2\u7a81 (fix conflict)<\/h4>\n<p>\u5728\u5408\u5e76\u5206\u652f\u6216\u62c9\u53d6\u66f4\u65b0\u65f6&#xff0c;\u5982\u679c\u4e24\u4e2a\u5206\u652f\u4fee\u6539\u4e86\u540c\u4e00\u6587\u4ef6\u7684\u540c\u4e00\u90e8\u5206&#xff0c;Git \u65e0\u6cd5\u81ea\u52a8\u5408\u5e76&#xff0c;\u5c31\u4f1a\u4ea7\u751f\u51b2\u7a81\u3002<\/p>\n<h5>\u51b2\u7a81\u7684\u8868\u73b0<\/h5>\n<p>\u51b2\u7a81\u7684\u6587\u4ef6\u4e2d\u4f1a\u5305\u542b\u7c7b\u4f3c\u4ee5\u4e0b\u7684\u5185\u5bb9&#xff1a;<\/p>\n<ul>\n<li>\n<p>&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD\u00a0\u5230\u00a0&#061;&#061;&#061;&#061;&#061;&#061;&#061;\u00a0\u4e4b\u95f4\u662f\u5f53\u524d\u5206\u652f\u7684\u4fee\u6539\u3002<\/p>\n<\/li>\n<li>\n<p>&#061;&#061;&#061;&#061;&#061;&#061;&#061;\u00a0\u5230\u00a0&gt;&gt;&gt;&gt;&gt;&gt;&gt; feature-branch\u00a0\u4e4b\u95f4\u662f\u8981\u5408\u5e76\u7684\u5206\u652f\u7684\u4fee\u6539\u3002<\/p>\n<\/li>\n<\/ul>\n<p>&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD<br \/>\n\u8fd9\u662f\u672c\u5730\u7684\u4fee\u6539<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\n\u8fd9\u662f\u8fdc\u7a0b\u7684\u4fee\u6539<br \/>\n&gt;&gt;&gt;&gt;&gt;&gt;&gt; feature-branch <\/p>\n<h5>\u89e3\u51b3\u51b2\u7a81\u7684\u6b65\u9aa4<\/h5>\n<li>\n<p>\u6253\u5f00\u51b2\u7a81\u6587\u4ef6&#xff0c;\u624b\u52a8\u9009\u62e9\u4fdd\u7559\u54ea\u4e9b\u4fee\u6539&#xff08;\u6216\u7ed3\u5408\u4e24\u8005&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5220\u9664\u51b2\u7a81\u6807\u8bb0&#xff08;&lt;&lt;&lt;&lt;&lt;&lt;&lt;\u3001&#061;&#061;&#061;&#061;&#061;&#061;&#061;\u3001&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5c06\u4fee\u6539\u540e\u7684\u6587\u4ef6\u6dfb\u52a0\u5230\u6682\u5b58\u533a&#xff1a;<\/p>\n<p> git add &lt;\u6587\u4ef6\u540d&gt; <\/li>\n<li>\n<p>\u5b8c\u6210\u5408\u5e76&#xff1a;<\/p>\n<p> git commit <\/p>\n<p>Git \u4f1a\u81ea\u52a8\u751f\u6210\u4e00\u4e2a\u5408\u5e76\u63d0\u4ea4\u4fe1\u606f\u3002<\/p>\n<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb877\u6b21\uff0c\u70b9\u8d5e15\u6b21\uff0c\u6536\u85cf11\u6b21\u3002\u80cc\u666f\uff1a\u4f7f\u7528https clone\u4ed3\u5e93\u540e\uff0c\u518d\u8fdb\u884c push \u548c commit \u6bcf\u6b21\u90fd\u8981\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\u975e\u5e38\u7684\u7e41\u7410\uff0c\u4f7f\u7528ssh key\u5219\u6bd4\u8f83\u7684\u7b80\u5355\u3002\u4e14\u6709\u4e00\u4e9b\u65f6\u5019\u5b58\u5728\u591a\u4e2a\u4eba\u4f7f\u7528\u540c\u4e00\u4e2a\u8d26\u6237\u7684\u60c5\u51b5\uff0c\u56e0\u6b64\u9700\u8981\u5206\u5f00\u5b58\u50a8\u6bcf\u4e2a\u4eba\u7684ssh key\u3002_github \u672c\u5730\u751f\u6210\u591a\u6761ssh<\/p>\n","protected":false},"author":2,"featured_media":22920,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[92,77,1760,43],"topic":[],"class_list":["post-22926","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-github","tag-ssh","tag-1760","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u591a\u4e2aGitHub SSH\u5bc6\u94a5\u548cGit\u4f7f\u7528\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/22926.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u591a\u4e2aGitHub SSH\u5bc6\u94a5\u548cGit\u4f7f\u7528\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb877\u6b21\uff0c\u70b9\u8d5e15\u6b21\uff0c\u6536\u85cf11\u6b21\u3002\u80cc\u666f\uff1a\u4f7f\u7528https clone\u4ed3\u5e93\u540e\uff0c\u518d\u8fdb\u884c push \u548c commit \u6bcf\u6b21\u90fd\u8981\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\u975e\u5e38\u7684\u7e41\u7410\uff0c\u4f7f\u7528ssh key\u5219\u6bd4\u8f83\u7684\u7b80\u5355\u3002\u4e14\u6709\u4e00\u4e9b\u65f6\u5019\u5b58\u5728\u591a\u4e2a\u4eba\u4f7f\u7528\u540c\u4e00\u4e2a\u8d26\u6237\u7684\u60c5\u51b5\uff0c\u56e0\u6b64\u9700\u8981\u5206\u5f00\u5b58\u50a8\u6bcf\u4e2a\u4eba\u7684ssh key\u3002_github \u672c\u5730\u751f\u6210\u591a\u6761ssh\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/22926.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T22:41:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418224141-6802d525598b1.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22926.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/22926.html\",\"name\":\"\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u591a\u4e2aGitHub SSH\u5bc6\u94a5\u548cGit\u4f7f\u7528\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T22:41:46+00:00\",\"dateModified\":\"2025-04-18T22:41:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/22926.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/22926.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22926.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u591a\u4e2aGitHub SSH\u5bc6\u94a5\u548cGit\u4f7f\u7528\u6559\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u591a\u4e2aGitHub SSH\u5bc6\u94a5\u548cGit\u4f7f\u7528\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/22926.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u591a\u4e2aGitHub SSH\u5bc6\u94a5\u548cGit\u4f7f\u7528\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb877\u6b21\uff0c\u70b9\u8d5e15\u6b21\uff0c\u6536\u85cf11\u6b21\u3002\u80cc\u666f\uff1a\u4f7f\u7528https clone\u4ed3\u5e93\u540e\uff0c\u518d\u8fdb\u884c push \u548c commit \u6bcf\u6b21\u90fd\u8981\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\u975e\u5e38\u7684\u7e41\u7410\uff0c\u4f7f\u7528ssh key\u5219\u6bd4\u8f83\u7684\u7b80\u5355\u3002\u4e14\u6709\u4e00\u4e9b\u65f6\u5019\u5b58\u5728\u591a\u4e2a\u4eba\u4f7f\u7528\u540c\u4e00\u4e2a\u8d26\u6237\u7684\u60c5\u51b5\uff0c\u56e0\u6b64\u9700\u8981\u5206\u5f00\u5b58\u50a8\u6bcf\u4e2a\u4eba\u7684ssh key\u3002_github \u672c\u5730\u751f\u6210\u591a\u6761ssh","og_url":"https:\/\/www.wsisp.com\/helps\/22926.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T22:41:46+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418224141-6802d525598b1.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/22926.html","url":"https:\/\/www.wsisp.com\/helps\/22926.html","name":"\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u591a\u4e2aGitHub SSH\u5bc6\u94a5\u548cGit\u4f7f\u7528\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T22:41:46+00:00","dateModified":"2025-04-18T22:41:46+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/22926.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/22926.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/22926.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u591a\u4e2aGitHub SSH\u5bc6\u94a5\u548cGit\u4f7f\u7528\u6559\u7a0b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/22926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=22926"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/22926\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/22920"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=22926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=22926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=22926"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=22926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}