windows下git安裝配置

來源:互聯網
上載者:User

標籤:git bash   密碼   安裝過程   安裝git   images   開啟   window   rsa   產生   

1.安裝

  TortoisesGit是Windows下比較好用的git gui軟體,安裝前需要先下載安裝git。安裝過程與普通應該程式相似。

2.ssh訪問

  ssh提供了可靠資料訪問。例如,github中設定ssh秘鑰,可以省去每次上傳下載輸入使用者名稱和密碼的麻煩。

TortoisesGit支援SSH訪問,方法如下:

(1)使用openssh設定公開金鑰和私密金鑰。

  安裝git後,開啟git bash。

  $ cd ~/.ssh

  $ git config --global user.name "xxx" 

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

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

  之後3次斷行符號,產生2個檔案(id_rsa和id_rsa.pub)。

 

(2)github添加公開金鑰

  開啟id_rsa.pub檔案,將其中的內容複寫到github的ssh_key中。

(3)測試

  ssh -T [email protected]

(4)TortoisesGit設定使用openssh

  在TortoisesGit -> setting -> 網路中,使用openssh。

這樣,我們就可以同時使用git bash和TortoisesGit訪問git伺服器。

(5)github下載代碼

  從github使用ssh下載代碼,注意選擇ssh方式,否則預設是https模式(需要使用者名稱驗證)。

windows下git安裝配置

相關文章

聯繫我們

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