1. Configure the GIT environment
Please download the latest version of the Git client from the GIT website. (Note, please bring your own ladder)
After installing the client, you need to complete the following configuration:
Configure User Name
Confirm that you are in the Csdn ID, get the way is after login, enter Passport.csdn.net, at the bottom of "personal account" to view the user name:
Then, on the command line, enter:
git config--global user.name "CSDN id"
Configure the Mailbox
The configured git mailbox should match the registered mailbox in CSDN Passport, and the system determines that the user name depends on the mailbox information:
git config--global user.email "CSDN Passport registered mailbox"
Check Configuration
Finally check that User.Name and User.email are configured correctly:
Git config-l
2. Add SSH public key
A public key is a way of authenticating code to identify your users, and with a public key, you can connect a local git project to code, and then you can easily upload the local code to code or download the code to local.
The following describes how to generate public keys and manage public keys. If you're using a Windows system, you'll need to install Git's Windows client msysgit, then run git Bash and enter the following code in the popup terminal.
Generate 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.
Add 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. 3, recommend a git helper tool: tortoisegit Download Address
Introduction to use