SSH login
-
Into the current user's home directory
$ cd ~ -
Remove the .ssh directory
$ rm -rvf .ssh -
Run command to generate a key .ssh directory
$ SSH-keygen -t RSA -C [email protected]
[Note: this parameter is herein -C uppercase C]
-
View a list of files into the directory .ssh
$ cd .ssh
$ LS -LF -
View the contents of the file id_rsa.pub
$ cat id_rsa.pub
-
Id_rsa.pub Copy the contents of the file, log on GitHub, click the user's avatar -> Settings-> SSH and GPG keys
-
New SSH Key
-
Enter the key information copied
-
Back to the Git bash create an alias address remote
git remote add [email protected]: atguigu2018ybuq / huashan.git -
Push files for testing