Eclipse and GitHub integrated full version

Source: Internet
Author: User
Eclipse and GitHub integrated full version

Recently, all of my friends recommended using GitHub to manage their own projects, and free users can have 5 repositories. I would like to know about git and take this opportunity to learn.
GitHub official guide uses an independent third-party git tool for version control, instead of using eclipse, But I think eclipse certainly has plug-ins to solve such problems, just like subclipse.

Install egit

Egit should be the best git tool on eclipse at present. If you are using eclipse indigo, you can directly click Help-> eclipse marketplace, find "egit" on the Search tab page and install it directly.

If you are not using indigo, you can download it from here.

GitHub

You need to register an ID on GitHub and create a repository. If you have any questions, click here.

SSH key generation

After the repository is created, you need to submit your own SSH key. Generally, there are two key generation methods:

  1. Use the ssh-keygen command of the msysgit tool provided in the official guide to generate.
  2. Use the SSH2 tool that comes with eclipse to generate.

The second method is used here. Use the SSH2 tool that comes with eclipse. The specific steps are as follows:

  1. If your SSH2 already has an ID key, back up the key and clear the directory.
  2. Click window-> preferences-> General-> network-> SSH2, click the key management tab, click Generate RSA key, and then click Save private key to save the key to the custom directory.

  3. Click Export via SFTP, fill in the git@github.com in the pop-up window, at this time your SSH directory will have an extra known_hosts file, this file is as important as id_rsa.pub.

  4. Open the generated id_rsa.pub, delete the content in the blank row copy, and paste it to SSH keys on GitHub.
  5. Restart eclipse and check whether the RSA key and known hosts can be loaded on the SSH tab. If you cannot check the above steps, you cannot connect to GitHub.
Push configuration
  1. Create an application, right-click the application, choose team> share project, select git, click Next, and click use or create repository in parent folder, directly finish.
  2. Create a ReadMe file in the application root directory, write the content at will, right-click the file, and choose "team"> "commit". The file is still in your local directory and is not pushed to the remote server.
  3. Right-click-> Team-> remote-> push, enter your project address here, protocol, click Next after entering, if there is SSH: // git@github.com: 22 The authenticity of host "github.com" can't be established. please restart eclipse for the RSA key error message. Continue this step after restart.
  4. If no exception exists, click Add all branches spec in the pop-up window, and then click Finish. The entire process is complete. Click GitHub to view your code.

    Source Address: http://www.pigg.co/eclipse-and-github.html? Replytocom = 2

Related Article

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.