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
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
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
- 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