GIt生成ssh密鑰

git config --global user.name "yangjianliang"
配置用戶名

git config --global user.email "[email protected]"
配置郵箱

此時,

會在C:\Users\Administrator目錄下生成.gitconfig配置文件:

請勿刪除!


ssh-keygen -t rsa -C "[email protected]"
生成公鑰和私鑰
按3次Enter,

不需要設置名稱與密碼

 

cat ~/.ssh/id_rsa.pub

查看公鑰

 

 

路徑是C:\Users\Administrator\.ssh

GitLab添加公鑰

 

 

 ssh -T [email protected]

測試配置文件是否正常工作

 

git clone [email protected]:root/TestProject_1.git

拉項目到本地

cd TestProject_1

進入項目

 來自https://www.cnblogs.com/yjlch1016/p/9692840.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章