Bitbucket is a really neat service that provides git source control for your projects. I will cover the steps needed to connect your project to Bitbucket.
1. First off, create an account on Bitbucket and install eclipse, if you did not already. You need to install egit in eclipse, which is achieved by going to Help, install new software, select an update site in the dropdown menu, and search for egit. After the installation create an account on Bitbucket and create a new repository, by following the simple steps displayed on the website.
2. Now you need to create a new key. In eclipse go to Window, Preferences, General, Network connections, select ssh2, key management and then generate rsa key. Type in a passphrase and save your newly generated private key.
3. Go to bitbucket, click on manage account, ssh keys, add key and paste your key.
4. Remain on bitbucket, go to your new project repository and select “I have code I want to import”. You need to copy the ssh url displayed in the second line.
5. In eclipse, right click on your project, select team, share project and check “Use or create repository in parent folder of project” and then click the Create repository and finish.
6. Yet again, right click on project, select team, commit and make sure you check all of the files in the project.
7. Finally, you can commit to bitbucket by right clicking project, team remote and push. In URI paste the url from step 4.
8. Go into git repositories view, find your project, right click and select Paste repository path or URI.
9. Next to URI click Change, you should already have the filled window with your ssh url, so press finish.
10. Click advanced and confirm that you want to continue connecting. Write your passphrase and on the next window select the source ref, make sure you do not forget to click Add All branches spec, afterwards press finish.
11. Finally, you can now save and push.