Git
Git
Git makes a special statement: It may not be possible for the blog editor to implement two "--" so there are spaces in the middle. To copy and paste the command, you need to delete the "--" space , for example: Git config--global user.name "yourName" need to remove the space Validation command Post-Installation execution: Git version
Return version information, install success one • Basic configuration 1. Configure user name (referenced at commit)
git config--global user.name "YourName" 2. Configure user name (referenced at commit)
git config--global user.email "Youremail" 3. Other configurations Use this configuration if the KDIFF3 tool is installed:
git config--global mergo.tool "Kdif3" lets git ignore Windows/unix line-break conversions
git config--global core.autocrlf false two • Encoding configuration 1. Avoid Chinese garbled characters in git GUI
git config--global gui.encoding utf-8 2. Avoid the git status command to display Chinese file names garbled
git config--global core.quotepath off 3. Ignoring case (requires configuration on Windows)
git config--global core.ignorecase false Three • Configure the public key (Git ssh key pair configuration) 1. Generate SSH key pair
Ssh-keygen-t rsa-c "Youremail" then go all the way to the carriage, do not enter anything, generate SSH key pair 2. Add Public key
Ssh-add ~/.ssh/id_rsa If there is an error message: Could not open a connection to your authentication agent. Execute the command below
Eval ' ssh-agent ' (' Yes ~ key ')
Then execute the above command 3. View the public key, copy the public key
Cat ~/.ssh/id_rsa.pub 4. Configure the public key to the remote repository
The site used is slightly different, basically similar to the way you configure it. The following error message appears stating that the public key, configuration to the remote repository, failed. focus on checking that the public key is configured under the user and not under the project
Access denied
EXEC request failed on Channel 0
Fatal:could not read from remote repository.
Sure you have the correct access rights
and the repository exists.