Git uses: Linux (Ubuntu 14.04 x64) to install git and configure the connection to GitHub

Source: Internet
Author: User

GitHub is a very good web-code hosting repository, known for a long time, but it has not been used until recently to start using GIT to manage its own documents and code.

Git is a very powerful version management tool that tells you today how to install Git under Linux and configure it to link to a warehouse on GitHub. I installed the environment is Ubuntu 14.04, 64 bit of

1. Install Linux under Installation

Using commands apt-get to install

sudo apt-get install git

2. Configure the user name password
git config--global"xxx"--global"[email Protected]"

At this point, a new file is created in the home directory .gitconfig

3. Add SSH Keys to your GitHub account
    1. Generate Keys

      " [email protected] "

      The system will prompt the key to save the location (typically the ~/.SSH directory) and specify the password, keep the default, three consecutive times to enter

    2. Copy SSH key to GitHub

Open the file, id_rsa.pub the contents of the file, paste it into the GitHub account Management Add SSH key interface

cat ~/.ssh/id_rsa.pub

Add with login github Settings SSH and GPG Keys New SSH key

    1. Test if the connection is successful
ssh -T [email protected]github.com

Will prompt

The authenticity of host ' github.com (192.30.255.112) ' can ' t be established.
RSA key fingerprint is sha256:xxxxxxxxx.
Is you sure want to continue connecting (yes/no)?

yesyou can enter it directly and then prompt for success:

Hi xxx! You've successfully authenticated, but GitHub does not provide shell access.

However, if the following error occurs:

Host Key verification failed.

Because the [email protected] was not added to Known_hosts, the error occurred, and the solution poked me

Use the following command to resolve the error:

ssh-keyscan-t RSA github.com >> ~/.ssh/known_hosts

Reference blog:

Linux (Ubuntu 64) Install git and configure connection GitHub error Summary (15)-Objective-unable to clone git

Git uses: Linux (Ubuntu 14.04 x64) to install git and configure the connection to GitHub

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.