编程知识 cdmana.com

Git error reporting solution: git@gitee.com : Permission denied (publickey).

Git Error reporting solution :git@gitee.com: Permission denied (publickey).

Complete error information

Error reason

I looked up a lot of information , The final decision is local ( Or on the server ) No generation SSH Public key

resolvent

First step

When you don't SSH Public key When , stay Terminal Enter the following command in :

ssh-keygen -t rsa -C "1106425813@qq.com"
 Copy code 
 Copy code 

Then press enter , The contents in the following figure will appear , There is no need to manage some problems to be input , All the way back , Will eventually generate SSH Public key .( If it is regenerated, the previous SSH Public key

The second step

Continue to Terminal Enter the following command :

ssh -v git@github.com
 Copy code 
 Copy code 

The third step

stay Terminal Enter the following command :

ssh-agent -s
 Copy code 
 Copy code 

Terminal Information similar to that in the figure below will be displayed in the

Step four

stay Terminal Enter the following command :

$ ssh-add ~/.ssh/id_rsa
 Copy code 
 Copy code 

Be careful :

Maybe some friends are taking the next step in the operation , There will be problems , The information shown in the figure below

If we encounter this problem , Don't panic , stay Terminal Enter the following command :

$ eval `ssh-agent -s`
 Copy code 
 Copy code 

Then enter :

$ ssh-add ~/.ssh/id_rsa
 Copy code 
 Copy code 

Pictured , Problem solved ! perfect !

Step five

According to the... Generated in step 4 SSH Public key path information , find id_rsa.pub, Open... As text , Copy everything inside .

After copying , Get into your Gitee( Code cloud ), Login account , Proceed as follows :

If you receive a message in your email , The public key is successfully added , This problem is naturally solved , Next, operate according to their needs . Reprint Original address :juejin.im/post/5e5cc3… Collect it so that you can check it next time .

版权声明
本文为[Flying in the wind-79]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/09/20210909135431047I.html

Scroll to Top