Use TortoiseGit with multiple GitLab accounts

99封情书 提交于 2019-12-08 08:54:09

问题


I have two GitLab account and want to use them with TortoiseGit so for that I made keys and add them to each account so no I have to key in .ssh folder like id_rsa_account1 and id_rsa_account2.
Also I changed config file like here and now I dont have problem in using git with cmd but I want to use it with TortoiseGit.

Now how can I have two repository like test1 and test2 and use them with TortoiseGit?


回答1:


How to set up two SSH keys for two GitLab accounts and push/pull by using TortoiseGit? only works if you use OpenSSH.

For using putty plink (which is the default in TortoiseGit) you need to create an alias in putty. You can find an answer here: https://stackoverflow.com/a/29183147/3906760

You can also make TortoiseGit use Openssh by setting the ssh client to "ssh" in TortoiseGit network settings.




回答2:


I have written an answer 'how to have multiple accounts with TortoiseGit with different username/password method (not with rsa keys). If you are interested in that method, then checkout the answer here https://stackoverflow.com/a/49468061/4036462



来源:https://stackoverflow.com/questions/33608447/use-tortoisegit-with-multiple-gitlab-accounts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!