Git SSH

創(chuàng)建單個(gè)ssh 密鑰

  • 創(chuàng)建

ssh-keygen -t rsa -C "youremail@example.com"
  • 查看

cd ~/.ssh
ls # 瀏覽下目錄下所有的rsa
cat ~/.ssh/xxx-rsa.pub

創(chuàng)建管理多個(gè)ssh 密鑰的時(shí)候

  • 第一步創(chuàng)建

ssh-keygen -t rsa -C "youremail@example.com" -f ~/.ssh/xxx-rsa
ssh-keygen -t rsa -C "youremail@example.com" -f ~/.ssh/xxx-rsa
ssh-keygen -t rsa -C "youremail@example.com" -f ~/.ssh/xxx-rsa
...

ssh-add ~/.ssh/xxx-rsa
ssh-add ~/.ssh/xxx-rsa
ssh-add ~/.ssh/xxx-rsa
....
  • 第二步,配置configer(~/.ssh),如果沒有的話創(chuàng)建

# dt-rsa (youremail@example.com)

Host gitee.com
User youremail@example.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/xxx-rsa

# gitee-rsa (youremail@example.com)

Host gitee.com
# HostName https://gitee.com
User youremail@example.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/xxx-rsa

....
  • 第三部測試密鑰是否可用

https://gitee.com
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,612評(píng)論 19 139
  • 單個(gè).ssh文件rsa rsa.pub生成: 一 、 設(shè)置Git的user name和email: $ git c...
    Mr_不靠譜_先森閱讀 4,696評(píng)論 0 1
  • ? 我有一把傘,你也有一把傘倘若相遇,你的傘能夠?yàn)槲艺陲L(fēng)擋雨 倘若分散,我的傘能夠?qū)ξ也浑x不棄 ? 風(fēng)起,...
    聽麥穗拔節(jié)閱讀 223評(píng)論 0 0
  • 班級(jí)情況: ...
    追夢人李靜閱讀 589評(píng)論 0 0
  • 江南的細(xì)雨織紗和北方的下雨如注都是經(jīng)典的情景。有個(gè)老伯抱怨,雨下的太大了,身上都淋了。聽到后,我看了下外面,這只是...
    深思心雨閱讀 277評(píng)論 0 1

友情鏈接更多精彩內(nèi)容