Install git and upload code under Linux (CentOS)

Source: Internet
Author: User

cat/etc/redhat-release Viewing system version information

"CentOS Linux release 7.4.1708 (Core)

Background: I have already registered a GitHub account, previously installed a GIT client under Windows system and uploaded a local project to GitHub, and now want to create a project on my own server and synchronize with GitHub remote repository. A similar one, remember again.

one, git terminal software installation
    1. install git under root User: yum install git
Second, the configuration
    1. Generate secret Key
      Use command: ssh-keygen-t rsa-c "[email protected]" To get the key (the mailbox here is the same as the GIT official online registration), enter the/root/.ssh directory, find a rsa.pub file, execute the command: VI id_ Rsa.pub, copy all of the contents.
    2. Browser into your github, open the settings, go to ssh and GPG keys3, click on new SSH key, fill in the title yourself, the following content to copy the previous open public key, and finally add the steps to read 4, you can use ssh-t [email Protected] Test Whether you can connect successfully, the middle of a input need to enter Yes, you can see Hi XXXX .... Access indicates success. 5, after the successful connection, you need to set up user information
      git config--global user.name ' username ' #设置用户名
      git config--global user.email "Youremail" #设置邮箱

    

Third, upload the project

Next you can create a new repository on GitHub and then submit a local project under Linux to GitHub.

    

    

    

Install git and upload code under Linux (CentOS)

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.