標籤:
GitHub for Windows
這是最好的方法,強烈推薦。
下載GitHub for Windows。
GitHub 正在開發新的案頭用戶端,可以留意 這裡。
在安裝完 GitHub for Windows 之後,完全可以使用用戶端操作,不需要輸多餘的命令。但是當我們需要配合其他軟體使用的時候,還是得配置 git shell。
通過 Git 連結 GitHub
官方教程在 這裡。
到 這裡 下載 Git。
安裝完後開啟 Git Bash。
依次輸入以下命令:
ls -al ~/.ssh
ssh-keygen -t rsa -b 4096 -C "[email protected]"
ssh-agent -s
eval $(ssh-agent -s)
-
ssh-add ~/.ssh/id_rsa
拷貝密鑰
clip < ~/.ssh/id_rsa.pub
然後到網頁上登陸你的 GitHub,添加 SSH Key。
接下來測試上面的操作有沒有成功:
輸入命令:ssh -T [email protected]
會提示你:
1 2 3 |
The authenticity of host ‘github.com (207.97.227.239)‘ can‘t be established. # RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. # Are you sure you want to continue connecting (yes/no)? |
輸入 yes 繼續,如果串連成功的話會收到類似下面的訊息:
1 2 |
Hi username! You‘ve successfully authenticated, but GitHub does not # provide shell access. |
完成這些操作後,windows 版的 Hexo 就可以正常上傳了。
在 windows 上折騰 GitHub