Open the Mac terminal (Terminal), enter cd ~/.ssh to enter the .ssh directory
Enter ls to view all files in the directory, check whether there is a file named id_rsa.pub in the directory, and see if there is an existing public key
If not, enter ssh-keygen -t rsa -C " your email address " to generate the public key. After entering the command, there will be several prompts to set the password. Please enter the password according to the prompt
Repeat steps 1 and 2 to check whether there is a file named id_rsa.pub in the directory. If it exists, enter cat id_rsa.pub to get the public key
Finally copy and paste to gitee