使用TortoiseGit和多个GitLab账户 [英] Use TortoiseGit with multiple GitLab accounts

查看:975
本文介绍了使用TortoiseGit和多个GitLab账户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个GitLab帐户,并希望将它们与TortoiseGit一起使用,以便我将密钥添加到每个帐户中,因此无需输入.ssh文件夹,如id_rsa_account1和id_rsa_account2。

我改变了配置文件,如这里,现在我在使用git和cmd时没有问题,但我想用它与TortoiseGit。

现在我怎么能有两个存储库,像test1和test2,并将它们与TortoiseGit一起使用?

解决方案

如何为两个GitLab帐户设置两个SSH密钥并使用TortoiseGit进行推送/拉取?只有在使用OpenSSH时才有效。



对于使用putty plink(这是TortoiseGit中的默认值),您需要在putty中创建别名。你可以在这里找到答案: https://stackoverflow.com/a/29183147/3906760



您还可以通过在TortoiseGit网络设置中将ssh客户端设置为ssh来让TortoiseGit使用Openssh。


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?

解决方案

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.

这篇关于使用TortoiseGit和多个GitLab账户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆