Git and GitHub

Source: Internet
Author: User
Git and GitHub are free and open-source distributed version control systems. GitHub hosts a remote repository and provides a Web interface. There are two protocols that support pushing code locally to a remote repository. One is HTTP. You need to enter the user name and password. The other is ssh. If you upload the public key to GitHub, you do not need to enter the password each time. The configuration process is as follows: 1. Configure the user name and email address?
   git config --list   git config --global user.name "xxx"   git config --global user.email "[email protected]"
If you have no user name or email address, configure it first. 2. You need an SSH key and GitHub account. The SSH key is local, and GitHub is a remote server.
Cd ~ /. SSH # Check whether the local machine has an SSH key. If the directory exists, it indicates that the local machine has an SSH key ssh-keygen-t rsa-c "email" #-T indicates the encryption method, RSA and rsa1 are available. DSA and ECDSA are optional. Generally, RSA #-C is the annotation.
If the local machine does not have an SSH key, generate an SSH key. The generated. Ssh folder contains two files: id_rsa and id_rsa.pub, respectively storing the private key and public key. If you do not have a GitHub account, register with the Web Client. 3. Upload the Local Public Key to GitHub. On the remote page, locate 4 to test whether the configuration is successful.
Ssh-T [email protected] # [email protected] is fixed, followed by the GitHub address, depending on your individual circumstances
Check whether the configuration is successful. How does git view the remote repository address?
Git remote-V or CD. Git cat config
How does git set the address of the remote repository? Example:
  git remote set-url origin [email protected]:someaccount/someproject.git

Git and 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.