git generate key bash: ssh-keygen-t: command not found

Problem Description:

Git was installed before, but it didn’t work much. Later I thought about putting the demo I made on github, and then generated the key and reported the following. It was stuck for a long time at this step, so I also decided to record it and hope it can help. To you guys!

Insert picture description here

Resolution process:

First check whether there is a key, and the key storage location:
Insert picture description here

If there are, some are not used for a long time or if the password is changed, the key seems to be changed. Here I suggest deleting:
execute the following command:
Insert picture description here
mkdir key_backup
cp id_rsa* key_backup
rm id_rsa*

After the execution, the key generated again is still the one reported.
Configure git environment variables as follows:
Insert picture description here
Add in path:
Insert picture description here

After the configuration, I choose not to use the black box of git bash anymore, and choose to use the dos command window.
Open the dos command window and
Insert picture description here
enter: ssh-keygen -t rsa -C "git account" is
Insert picture description here
successfully generated:
id_rsa.pub is the ssh key we need
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43888891/article/details/112429980