在 windows 上折騰 GitHub

來源:互聯網
上載者:User

標籤:

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.