1. Introduction
When using Gitee, the public key is necessary, whether cloning or uploading. This article mainly introduces how to generate and add public keys to the server locally, and then configure your own user information to facilitate pulling and uploading codes in the future.
2. Step introduction
2.1 Generate public key locally
. Open git bash, enter: ssh-keygen -t rsa -C "your email", and then press Enter three times.
Enter the (cat ~/.ssh/id_rsa.pub) code to view your public key (see picture above)
2.2 Gitee adds public key
2.3 Configure user email and user name
git config --global user.email [email] //邮箱
git config --global user.name [username] //密码
Check whether the configuration is successful.
The appearance of user.email and user.name indicates that the configuration is successful.