服务器git密钥
I have access to different git servers. I have several keys for these servers. How to use different keys for different git servers?
我可以访问其他git服务器。 我有这些服务器的几个键。 如何为不同的git服务器使用不同的密钥?
Use the .ssh/config
file to specify different configuration for different SSH servers used by git:
使用. ssh /config
. ssh /config
文件为git使用的不同SSH服务器指定不同的配置 :
For example:
例如:
Host git.example.org
Port 22111
IdentityFile ~/.ssh/id_rsa.git.example.org
Host code.example.org
Port 22
IdentityFile ~/.ssh/id_rsa.code.example.org
which specifies the port and private key file for git.example.org and code.example.org.
它指定git.example.org和code.example.org的端口和私钥文件。
Answered by anonymous.
匿名回答。
翻译自: https://www.systutorials.com/how-to-use-different-keys-for-different-git-servers/
服务器git密钥