Multiple git account in the same computer (Windows)
Set gitconfig
Global config: default path C:\Users\Elmo\.gitconfig
[User] name = elmo_aaa email = elmo@aaa.com [includeIf "gitdir/i:D:/Note/"] path = D:/Note/.git/config
Specific project config: D:/Note/.git/config
[User] name = elmo_bbb email = elmo@bbb.com
Generate SSH Key for specific account
ssh-keygen -t rsa -C "elmo@bbb.com"
the default path is C:\Users\Elmo\.ssh
it can't use the default name in the default path because it will replace the original account SSH key
finally, copy the content of public key and paste in GitLab SSH keys
文章標籤
全站熱搜
留言列表