A quite probably relevant piece of information is that I have a custom ssh config set up for bitbucket. In my '.ssh/config' file I have the following:
[ivanna@comp]$ cat ~/.ssh/config
Host bitbucket
Hostname bitbucket.org
IdentityFile /home/ivanna/.ssh/id_rsa_bitbucket
IdentitiesOnly yes
The permissions on this file are definitely correct as far as ssh is concerned (I actively use other entries in the config file). Now when I added the remote origin in git I used bitbucket instead of bitbucket.org:
git remote add origin bitbucket:ivanna/my-repo.git
but when I try to push I get the following error:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
So it seems like I didn't add my public key or something, right? But I definitely did. And when you search for more information you find this page about the error (https://confluence.atlassian.com/pages/viewpage.action?pageId=302811860). And when I do what they say to do to check the key:
[ivanna@comp]$ ssh -T hg@bitbucket
logged in as ivanna.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
It can login fine, it seems. So... why doesn't pushing work? The above link mentions that it could be a permissions issue on the project itself but I set the permissions as people suggested and it did nothing. Anybody know what's going on?