Brief introduction
Recently I wanted to write their own script instead aliyun code above (ps: github when the good times and bad, the key slower speeds).
The stepped pit recording, to facilitate rapid problem resolution.
Generating a Certificate
The method of generating a key according to the given code aliyun
document provided Ali cloud, aliyun-CA-SSH
ssh-keygen -t rsa -C "[email protected]"
Enter file in which to save the key (C:\Users\xxx\.ssh/id_rsa):aliyun-git
Enter file in which to save the key (C:\Users\duany/.ssh/id_rsa): #无特殊,要求回车
Enter passphrase (empty for no passphrase): #无特殊,回车
Enter same passphrase again:
Add a certificate
The public key is added into the personal information
you add a certificate Address
Solution
At first I thought it was confused certificate, certificate rebuilt three times. Do a head to be brain crack.
Then I found git submit tips Permission denied (publickey), which is no certificate authority. Then tested and found id_rsa this default certificate name. Specify the certificate name can be solved
PS C:\Users\xxx> ssh -T [email protected]
[email protected]: Permission denied (publickey).
PS C:\Users\xxx> ssh -T [email protected] -i .\.ssh\aliyun-git
Welcome to GIT, xxxxx!