I’ve been trying to start a project using EGit with Bitbucket but I can’t push the project to the repository in the server.
These are the steps I’ve followed (I’ll try to be very specific so other people can use it as a tutorial mode; even though it’s not working for me it might work for others):
1) I installed Git on Ubuntu 12.10 using this tutorial
2) Followed this tutorial for GitHub.
- Start a new C++ project in Eclipse
- Under Window > Preferences > General > Network Connection > SSH2 > Key Management tab, I generated a new RSA key and added it to the list of deployment keys of my repository on Bitbucket.
- Right click on the eclipse project: Team > Share project ; Team > Add to index ; Team > Commit
- Window > Show View > Other > Git > Git Repositories
- Right click on Remotes > Create Remote > Checked “Configure push” and typed my project’s name
- Add Push URL:
ssh://git@bitbucket.org/myuser/myrepository.git, Protocol: ssh; port: blank; user: git; password: blank - Advanced button under Ref mappings and selected the “master” version. If this step works, it means that the RSA key is configured in Bitbucket and EGit properly. Otherwise it will show a connection error.
Everything is done. However, when I press “Push” I get the following error:
ssh://git@bitbucket.org/myuser/myrepository.git: push not permitted
I’ve tried every configuration possible: switched to a new work space, updated Eclipse, created new repositories, re-installed Git… Any ideas?
Alright, I’ve finally found a way to work with it.
It’s just changing the authentication mode. If the HTTPS link is used, instead of using the SSH link, everything works perfectly. It seems that SSH works just in a read-only mode.
Of course the authentication method is different: you have to type the password and the SSH keys stored in Bitbucket are no longer necessary.
For those who are having problems with EGit, I recommend following eugener’s way to automatically configure EGit. Then you just have to select HTTPS as authentication mode to push the stored commits.