Eclipse uses Egit to manage GIT@OSC projects

Source: Internet
Author: User
Tags ssh git client
Git is the current most streamed distributed version Control tool, and as the most mainstream (not one) Java development tool, Eclipse is supported in the form of plug-ins, which is egit. Here's a look at the process of managing git remote projects using Eclipse's egit. This may not be a best practice, of course, but it is certainly not a problem to do so through my validation. The net to get the final feeling shallow, must know this matter to preach. Eclipse EGit version management tool development tools

Git is the current most streamed distributed version Control tool, and as the most mainstream (not one) Java development tool, Eclipse is supported in the form of plug-ins, which is egit. Here's a look at the process of managing git remote projects using Eclipse's egit. This may not be a best practice, of course, but it is certainly not a problem to do so through my validation. The net to get the final feeling shallow, must know this matter to preach. Preparation: System environment: Windows xp/windows8.1 installation eclipse: What do I have to say? Install Egit: I'm using Eclipse Kepler, which has a Egit plugin, no need to install it.         Prior to Kepler, you can install the Egit plugin yourself, either through the Eclipse Marketplace, install New software, manually download the link, or simply put it in the plugin directory. The preparatory work is complete and no more installation is required. First step: Configure the Environment configuration git (Egit): Set git home: You need to provide a home path for git in the system environment variable. This directory will be used to save the GIT configuration file and the default local repository. I use F:\GitHome here, of course you can set any path of the system disk.

Configure GIT user information: Configure git user information in the Eclipse Preferences git configuration option, where you can see that Eclipse uses the previously set home to keep git configuration information. Select Add Entry on the interface ... Add user Information key:user.email/value:good-long@qq.com, Key:user.name/value: Desert people, of course, you want to change your own information.

Click Apply to complete the configuration. Here git configuration is done.

Special Note: Egit is a git client, I do not need to install any other git client, see many people on the Internet to write here also to install such as Msysgit, Tortoisegit GUI client, these are rumors. If you really need it, you can install it. Configure SSH: Configure the SSH Home path: Of course, there is still a lot of rumors on the internet using Eclipse's SSH2 tool: Eclipse SSH is not used, if the git GUI ssh command line. SSH default home in the User/.ssh path, in order to facilitate management, here I used the githome path: F:/githom/.ssh. You can still use any of the system's paths here.

Generate RSA key pair: Next use key Management "Generate RSA key ... Generate SSH key, enter the password, this password will be used when using the key, click on the Save Private key saved key, this time will be in SSH home under two files: Id_rsa, id_rsa.pub. Id_rsa is the key to SSH key pair, can not be disclosed, and Id_rsa.pub is the public key of SSH, the use is described below. Select the Id_rsa file here in the private keys in the previous step. Click Apply,ssh Configuration to complete.

In this step, the local configuration is all done. Step two: Manage warehouses to create warehouses: here, for example, Http://git.oschina.net remote warehouse management, other warehouse project methods are similar. Add SSH Public key: First you will add your SSH public key to the SSH public key of your Git hosting service website, and the SSH public key is in the. ssh/id_rsa.pub file. Copy and paste it in. It is particularly important to note that this is the SSH public key under the user profile, not the deployment public key under the project. The project's deployment public key is read-only and has no write permission, which means you can pull the project and not push. If this is wrong, the push times will be wrong: "Push not permitted", of course, this is something.

Create a project: Use the "+" of the Git@osc menu bar to create a project, fill in the project information, and create the project. Special note: ". Gitignore" file cannot be empty, or will be in your clone project when the error: "Does not appear to be a git repository".

Clone project: First copy the project's SSH address: git@git.oschina.net:coxapp/hello.git, then the eclipse's Git repository admin panel clone project to Local.

The GIT repository admin panel for Eclipse can be displayed by using the window "Show View" and "Git" git repositories.

Clicking on Clone a git repository will automatically populate the Windows with the git information of the copied Hello project, and click Next directly.

Enter the password to generate the RSA key, and the next to finish is OK.

Here we will see the project information for clone to the local repository in the GIT Warehouse management panel.

At this point, the warehouse already has, the following is the management code. Step Three: Manage Code import Project: File "import" Git "project from Git" Next "Existing local repository Select the native Hello Project, the next is done." If you are already an Eclipse project, select Import Existing project. You can also use the File import git project from git Next URI to import directly using the address of your git projects.

Push update: After you import and convert Hello from the local warehouse to a Java project in the previous step, the project has been updated and can be submitted using the project right-click Team commit. Use Team Remote push to push the update to the OSC server. At this point, you can see the update of the project on the Http://git.oschina.net/coxapp/Hello page. Pull update: Git is a version control tool that works with multiple people, and we pull each push to see if anyone else has updated the code. Last note: In the above process did not mention, follow the default prompts to do OK, and how to push and pull details and more git operation, to a URL http://wiki.eclipse.org/EGit/User_Guide yourself explore it.

First use, not necessarily the best way, you are welcome to correct me.

Source: "Eclipse uses egit to manage GIT remote project kick"

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.