Submit code to GitHub in MyEclipse

Source: Internet
Author: User
Tags parent directory asymmetric encryption

This requires the use of plug-in Egit, the first is to download the plug-in, can be downloaded in Eclipse, can also be downloaded outside, download does not say. Git://github.com/houyongchao/plugin-egit.git

Download good, unzip, will unzip this folder (from a name Egit bar), find MyEclipse installation path, in the installation path to find Dropins folder, just unzip the folder Egit put into the inside on the line. You need to restart MyEclipse at this time. After restarting, click Window→show view→others This will pop up a box, if there is a git directory, congratulations, the plugin is ready to use.In fact, Google's SVN plugin installation steps and the same. The following can be submitted code, in the project name right, →team→share project→ choose Git, then next, will pop up a box in the repository position let you fill in as a library, you can click on the right of the create will pop up a box, Parent Directory is the default parent path, can not change, name out of a library name, you can make a name. When you're done, click Finish. This is the time to copy your project into your library and finish at the point. What happens to your project name at this point?   Numbers, these question marks indicate that they are not in these repositories. Now it's time to commit the code, right-click on the project name, →team→commit the submission to your local library, the library you just built, enter some submitted information in the first input box in the pop-up commit change box, such as "first Commit", The following to select the file to submit, you want to submit which file in front of the √ select on the line, if you want to choose all, in the right middle of a √ box, click on the line. OK, just commit, and look at your project name, right? The number has turned into a golden jar, stating that you have submitted it to your local library.
If you want to submit to Gihub, right-click on the project name, →team→remote→push will pop up a box, the following is more troublesome.  The bottom premise is that you've already registered with GitHub.  Create a new library, build it will jump to a page, there are HTTP and SSH two protocol address, this will be used. Don't be redundant, here are some transport protocols and key verification things,It seems that git transport defaults to using SSH (usually referred to as the SSH2) protocol, and of course can use other common transport protocols. While the SSH2 protocol has a variety of authentication methods, password, password plus certificate, or pure certificate, the certificate refers to the asymmetric encryption key, holding the private key, Put the public key on the server, then the two sides, and the server will know it's you.

GitHub is the public key to use this key to match the authentication method, of course, there is the HTTP protocol, in fact, is HTTPS, but do not know whether it is because the previous period of time was attacked, or the first upload is more important, anyway, my first push project must use SSH2 way, Up to see the HTTPS link, maybe you can use HTTPS directly. FQ comrades may know some ssh2, but often with Win7 do not deal with Linux children's shoes may be unfamiliar, because Win7 is not native support SSH2.

So to upload your project on GitHub, first of all, you have to have RSA key pair, well, eclipse itself has this tool, but ... Do not use, Wood has the hosts file, pit dead father, I am in this round a day Ah, yes, also want a hosts file. So, the GIT bash that was installed earlier is useful. As for how to generate the key, check out my other blog post, Http://blog.sina.com.cn/s/blog_ 9cd9df230101asbl.html

The default SSH key file appears to be under the. SSH folder, The most important is that the generated key, as well as the hosts file, copied to the current user directory under the SSH folder, Win7 and XP user directory is not the same.

then the above do, in the project name right-click, →team→remote→push will pop up a box, let you fill in an address, you create a new library is generated two protocol address, select one, if you choose HTTPS, then copy it, paste it into the first input box, The following will automatically fill you, protocol and port number, do not have to manage, in name and password, to enter your name and password to register GitHub, and don't forget to choose Remember Password, finish the point after finishing on the line. The following is the beginning of the submission. If you choose SSH protocol, then copy it, paste it into the first input box, the following all do not move, name is a git, but do not have to go into the GitHub account password, otherwise you will be very painful, such as encounter God Horse "Exception caught During execution of ls-remote command "problem, the reason is very simple, GitHub uses the pure RSA authentication method, as long as your private key with the public key, with the common account git login can, absolutely do not need to add the account password, That would make a mistake, then, jump, and then, suggest the average person click "Add all Branches Spec" bar, then finish.

Let's wait here!

If you don't have before generating the Hosts file, use Egit directly to push will encounter

"Warning:permanently added ' github.com,207.97.227.239 ' (RSA) to the list of know hosts.
Permission denied (PublicKey) "

Submit code to GitHub in MyEclipse

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.