Git安裝和基本設定(Windows)

來源:互聯網
上載者:User

標籤:下載   命令   first   ssh   follow   .com   密鑰   gen   conf   

1.Git

https://git-for-windows.github.io/

2.下載完成後安裝

  自行百度

3.配置github的ssh密鑰:

  1)開啟Git Bash查看電腦上是否已經存在SSH密鑰;

    輸入 cd ~/.ssh

    

    如顯示無法找到該檔案則要建立新的ssh key;

  2)建立新ssh key:

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

    執行這條命令會提示檔案儲存路徑,可以直接按Enter,

    然後提示輸入 passphrase(密碼),輸入兩次(可以不輸直接兩次Enter)

    

    在 .ssh 目錄生產兩個檔案:id_rsa和id_rsa.pub

    用記事本開啟.ssh目錄下的id_rsa.pub檔案,複製裡面的內容;

4.複製ssh key到github:

5.測試 ssh 連結 github:

    輸入 ssh -T [email protected]

    

    出現successfully,完成。

6.配置本地資訊:

 

  git config --global user.name "Firstname Lastname"

  git config --global user.email "[email protected]"

  可輸入 git config --list 查看自己的git資訊

 

Git安裝和基本設定(Windows)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.