git--version tool configuration and error handling

Source: Internet
Author: User
Tags commit error handling ssh

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.