Use TortoiseGit with multiple GitLab accounts

2019-05-30 20:12发布

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?

2条回答
够拽才男人
2楼-- · 2019-05-30 21:04

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.

查看更多
时光不老,我们不散
3楼-- · 2019-05-30 21:15

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

查看更多
登录 后发表回答