The foreign web site GitHub provides a git warehouse hosting service, and the domestic [email protected] also provides hosting services, so just sign up for a github account or [email protected] Account
You can get a git remote repository for free. GitHub creates a public library that's free, and private libraries pay a bit of money. But [email protected] are free.
Because the transfer between your local git repository and the GitHub repository is encrypted via SSH, you need to set up:
1. Create an SSH Key. In the user's home directory, see if there is a. SSH directory, if there is, look at this directory there is no, no, open git shell, create ssh Key:
[Email protected] MINGW32 ~
$ git config--global user.name "Mars"
[Email protected] MINGW32 ~
$ git config--global user.email "[Email protected]"
[Email protected] MINGW32 ~
$ ssh-keygen-t rsa-c "[Email protected]"
Generating public/private RSA key pair.
Enter file in which to save the key (/C/USERS/LV/.SSH/ID_RSA):
Created directory '/c/users/lv/.ssh '.
Enter passphrase (empty for no passphrase):
Enter same Passphrase again:
Your identification has been saved In/c/users/lv/.ssh/id_rsa.
Your public key has been saved in/c/users/lv/.ssh/id_rsa.pub.
The key fingerprint is:
........................................................
If all goes well, there will be a. SSH directory in your home directory with Id_rsa and id_rsa.pub two files, these two keys are SSH key pair, Id_sa is the private key, can not be leaked out,
Id_rsa.pub is a public key that can be told to anyone.
2. Log on to GitHub and open "Setting",
Click "SSH and GPG keys"---> "New SSH Key", fill in any title, paste the contents of the Id_rsa.pub file in the key text box:
Then click "Add SSH Key", so you should see the key already added:
Why does GitHub need SSH key? Because GitHub needs to recognize that your push submission is really what you commit, not someone else posing, and git supports the SSH protocol, GitHub just knows your public key,
You know, you pushed it yourself. GitHub allows you to add multiple keys. If you have multiple computers, you will be presented at the company. You can submit it at home, just add each key to GitHub and
The computer was pushed on GitHub. The free hosted warehouse on GitHub is visible to anyone (only you can change it). So don't put sensitive information in it.
If you don't want people to see your git repository, there are two ways to make GitHub turn public repositories private (which requires money) so that no one else can see them, and the other is to build a git server.
The company's internal development will do so. It seems that the domestic [email protected] Private library is free, but it is still possible to play. Personal feeling of domestic things is to use this is not assured.
Git remote repository