Use Git for a long time under Windows system. Try git under Linux, and I'll summarize the first time I've installed git in an Ubuntu environment.
First, enter the git command.
One, install
If the system does not have Git installed, it will be very friendly to prompt for the git command: apt-get install git
Installation process:
Because the old software source was previously added (replaced) by Apt-get, it can be installed directly, and if the git source is not found at this point, you need to add the resource (this procedure is omitted here).
The installation is complete at this time.
Two, do git configuration
Command git config--global user.name ' XXXXXX '
git config--global user.email ' [email protected] '
Third, generate the public key
After the configuration is complete, you need to create a public key for validation, because git
it accesses the repository in a ssh
way that requires you to create a locally validated file. Use ssh-keygen -C ‘[email protected]‘ -t
the command mailbox as the email address you just entered. The generated public key is under the current folder.
Enter the name saved by the public key, enter the password (not blank), and confirm the password (not blank).
Four, upload the public key
Find the public key file generated by the previous step, my name is Key.pub
Open http://git.oschina.net/(Open source China Code cloud) or https://github.com/(GitHub)
Kaiyuan China is set as follows: Modify data--->ssh public key
GitHub settings are as follows: setting-->
Kaiyuan China is set as follows: Modify data--->ssh and GPG keys---->new SSH Kes
Click Add to complete the upload. (PS: If there is no code cloud or GitHub account, please apply for an account, the application process will not repeat here).
Five, test
Cloning is complete, which means that Git has been successfully installed on Linux. (*^__^*)!
Install git and test under Ubuntu