By alexmoreno, 10 February, 2013

Look mom, without hands...

First, change this in your .git/config:

old url:
 url = https://USER@bitbucket.org/hispamedios/PROJECT.git
new one:
url = ssh://USER.bitbucket.org/hispamedios/PROJECT.git

 

Edit your .ssh/config, in your local directory, and add this:

 cat .ssh/config
Host YOURUSER.bitbucket.org 
HostName bitbucket.org 
User git
IdentityFile ~/.ssh/bitbucket

The last line is important, so you are indicating your identity file. Now create this file:

By alexmoreno, 6 November, 2012

Let me got directly to the point. The bitbucket documentation is wrong, on the begining you are just suposed to do a git remote add origin

in the directory which you want to commit. But this will not work:

fatal: Not a git repository (or any of the parent directories): .git

Solution? Init the repository:

git init

git remote add origin https://ACCOUNT@bitbucket.org/ACCOUNT/REPOSITORY.git

git push -u origin master

will also don´t work :-(. The problem is that the message error is all but obvious.