SourceTree上配置SSH,獲取GitLab代碼(圖文教程)
1、打開(kāi)Souce Tree--> 點(diǎn)擊命令行模式
2、輸入$ ssh-keygen -t rsa -b 2048 -C "your_email@163.com"

3、在目錄C:\Users\axia\.ssh下會(huì)生成兩個(gè)文件,將公鑰文件id_rsa.pub中的內(nèi)容拷貝到剪貼板。

4、在GitLab Server上登錄 --> User Settings --> SSH Keys -->將剪貼板內(nèi)容粘貼到Key中。

5、打開(kāi)Source Tree --> 工具--> 選項(xiàng)-->選擇id_rsa(私鑰)--> 選擇OpenSSH-->確定

6、打開(kāi)Source Tree--> 文件-->克隆/新建-->下載GitLab上的代碼。

注:如果我們不想設(shè)置Source Tree的SSH,也可以直接用git clone命令行的方式從GitLab獲取代碼。
posted on 2022-01-06 00:00 金木雜談 閱讀(1522) 評(píng)論(0) 收藏 舉報(bào)
浙公網(wǎng)安備 33010602011771號(hào)