I just configure two ssh keys on git, but when i test ssh connection it returns a error,here is the
debug log:
debug1: key_load_public: No such file or directory
Connection to code.aliyun.com closed by remote host.
Connection to code.aliyun.com closed.
Transferred: sent 2528, received 1472 bytes, in 0.0 seconds
Bytes per second: sent 12863830.2, received 7490331.5
debug1: Exit status -1
I don't know where went wrong, I have send the public key to the sever and still got a error,thanks
It depends on the exacy SSH URL you are using once you have configured those two keys.
Configuring multiple SSH keys should be done in a ~/.ssh/config file
Host key1
HostName code.aliyun.com
IdentityFile ~/.ssh/my_key1
User git
Host key2
HostName code.aliyun.com
IdentityFile ~/.ssh/my_key2
User git
The URL would then be:
key1:aUSer/aRepo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With