一、登錄
Gitee(碼云)代碼托管平臺:
Gitee - 基于 Git 的代碼托管和研發協作平臺
新建個人賬戶如下:
二、SSH 公鑰設置
1、在git安裝目錄打開“git-cmd.exe”;
2、通過命令?ssh-keygen
?生成 SSH Key:
ssh-keygen -t ed25519 -C "Gitee SSH Key"-t key 類型
-C 注釋
輸出,如:
Generating public/private ed25519 key pair. Enter file in which to save the key (/home/git/.ssh/id_ed25519): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/git/.ssh/id_ed25519 Your public key has been saved in /home/git/.ssh/id_ed25519.pub The key fingerprint is: SHA256:ohDd0OK5WG2dx4gST/j35HjvlJlGHvihyY+Msl6IC8I Gitee SSH Key The key's randomart image is: +--[ED25519 256]--+ | .o | | .+oo | | ...O.o + | | .= * = +. | | .o +..S*. + | |. ...o o..+* * | |.E. o . ..+.O | | . . ... o =. | | ..oo. o.o | +----[SHA256]-----+
- 中間通過三次回車鍵確定
3、查看SSH生成路徑
- 私鑰文件?
id_ed25519
- 公鑰文件?
id_ed25519.pub
4、設置賬戶 SSH 公鑰
用通過主頁右上角?「個人設置」->「安全設置」->「SSH 公鑰」->「添加公鑰」?,復制生成的公鑰生成的 public key 添加到當前賬戶中
三、克隆代碼到本地
1、點擊克隆/下載:
2、復制鏈接:
3、打開“Git Bash Here”
4、克隆下載:
右鍵單擊“Paste”,復制上述git鏈接