1. Generating the public key
First check the native public key:
$ CD ~/.ssh
If prompted: No such file or directory indicates that you are using Git for the first time. If you are not using it for the first time, do the following to clean up the original SSH key.
$ mkdir key_backup$ cp id_rsa* key_backup$ RM id_rsa*
To generate a new key:
$ ssh-keygen-t Rsa-c "your email address"
In the carriage return you will be prompted to enter a password, which will be used when you submit the project, if it is empty, you do not have to enter the project.
You can find an. ssh file in your user folder under your native system disk, where the SSH key that you just generated is stored in the Id_rsa.pub file.
2. Add a public key
Login to the Code platform, enter the user "account Settings", click on the right side of the column "SSH Public Key Management", click "Add Public Key", the public key just generated to fill in the "Public Key" column, and give it a name, save it.
Note : Do not copy extra spaces when copying the public key, otherwise the addition may not succeed.
I came across an item: Sometimes you need to create a new config file in your generated. SSH directory, and then write the user xxx
3. Managing the Public key
You can also delete or modify the public key in the account settings-SSH public Key management.
4. View the public key
Enter the name of the cat+ public key at the terminal, and enter to view the contents of the public key!
How to generate an SSH public key