git???ù?????????ssh??key
???????????? ???????[ 2016/12/7 10:04:55 ] ????????git ???ù???
?????????????Щ??????ū????git??ssh??key????????????????ū?????gitlab?????ūgithub?á?????????????????????????????????????????????????????????????????μ????????????á???????????????????????
????????????????????????????????????????????????????????????????????????????????????ü??ɡ?
????gitconfig --global --unsetuser.name
????gitconfig --global --unsetuser.email
????????ssh key
?????????????????????????????~/.ssh??????С???C:/User/xxx/.ssh??
????ssh-keygen -t rsa -C "yourmail@gmail.com"
????????????·????????????????????????????????λ?????ε??????????????“Enter file in witch to save the key”????????????????key???????????????????????????????????????a??b??
??????????~/.ssh??????£??????????????????????a??a.pub??b??b.pub???????????????????.pub?????????????????????????????
??????????????????????????????????????????????????????????顣
?????????
?????????????ssh-agent?????????git????????????????????ssh-agent -s???????msysgit?????????????????eval ssh-agent -s ?????????????Ч?????????????????
??????????????????????
????ssh-add ~/.ssh/a
????ssh-add ~/.ssh/b
???????????????
????????config???
??????????config?????~/.ssh???檔??????????????′????????????????????????????
# a
Hostgitlaba.com
HostNamegitlaba.com
PreferredAuthenticationspublickey
IdentityFile ~/.ssh/a
Useryourname
# b
Hostgitlab.b.com
HostNamegitlab.b.com
PreferredAuthenticationspublickey
IdentityFile ~/.ssh/b
Useryourname
???????檔???????????~
??????????£?Host??gitlab??????HostName???????á?IdentityFile???????д????????????????.pub????User????????????
??????????
????????????????????????
????ssh -T git@a.com
????????????Welcome to gitlab xxx????????????github??????????????????????????????????????????????????????????????????????????????????????????
????ssh -vTgit@a.com
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11