Windows下Git用戶端和Github設定

來源:互聯網
上載者:User

標籤:git設定、git用戶端、windows git用戶端


第一步:安裝Git For Windows

  •      msysgit是Windows版的Git,從https://git-for-windows.github.io/下載,然後按預設選項安裝即可。

  •      下載連結:https://github.com/git-for-windows/git/releases/latest

  •       然後各種下一步,建議使用預設選項。

  •       安裝完成後,在開始菜單裡找到“Git”->“Git Bash”,可以開啟命令視窗,就說明Git安裝成功!


第二步:設定Git用戶端
    
          1.首先啟動一個Git Bash視窗(非Windows使用者直接開啟終端)。設定使用者名稱和郵箱,告訴別人你是誰!

git config --global user.name "Your Name"git config --global user.email "[email protected]"

          2.生產金鑰組:注意還是在Git Bash裡面操作。

2.1.執行:

cd ~/.ssh

如果返回“… No such file or directory”,說明沒有產生過SSH Key,直接進入第3步生產新的Key。否則進入第2步備份!
2.2.如果之前已經產生過了,需要進行備份:

mkdir key_backup mv id_isa* key_backup

2.3.產生新的Key:(引號內的內容替換為你自己的郵箱)

    ssh-keygen -t rsa -C "[email protected]"

        直接斷行符號,不要修改預設路勁。

    Enter passphrase (empty for no passphrase): Enter same passphrase again:

      設定一個密碼短語,在每次遠程操作之前會要求輸入密碼短語!閑麻煩可以直接斷行符號,不設定。

第三步:在GitHub上提交公開金鑰:

  1. 找到.ssh檔案夾,用文字編輯器開啟“id_rsa.pub”檔案,複製內容到剪貼簿

  2. 開啟 https://github.com/settings/ssh ,點擊 Add SSH Key 按鈕,粘貼進去儲存即可。


Windows下Git用戶端和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.