I\'m getting the following errors in Git using BitBucket:
conq: repository does not exist.
fatal: The remote end hung up unexpectedly
How do I
I had this error when trying to deploy with Capistrano.
I was missing the deploy key for that Bitbucket repo.
Here's how to solve the issue:
Once that's finished just go to the Bitbucket repo > Settings > Deploy Keys and copy and paste your newly created key.
in my case, i mixed up usernames:
in my scenario there are 2 accounts: i need to connect using my-account to the repository's owner-account:
owner-acc - created, maintaining the account
my-acc - me, a participant
the syntax in this case should be
url = git@bitbucket.org:owner-acc/repo-name.git
and NOT my username, nor my account-name.
I assume bitbucket's instructions I followed previously took care of identifying me somehow (it's probably relating my-account with the public key i uploaded earlier).
In my case, i changed the repo name. Therefore, i was not able to push because changing repo name also changed repo remote url. Thus,
First remove previous remote url by git remote rm origin
now add new one and do push.
Hope it'll help someone. Cheers!
I had a similar problem, and this thread helped me solve the issue, but my solution is slightly different:
I was on a remote server, so first I had to change into the public_html (www) directory, then initialize the repo. (note you have to first add your .ssh key in bitbucket)
$ git init
which initialized an empty Git repository
then add the remote
$ git remote add origin git@bitbucket.org:myname/myproject.git
then I was able to pull and checkout my branch
$ git pull
$ git checkout <branch-name>
In my last case it was all related to capitals in the repo name in Bitbucket. Even when the repository name had capitals, Bitbucket was telling me to use lower case names in the git commands to push initial code. This could be related to git case handling and unix/windows case handling. Just check this if your project name has upper case letters.
This error also occur when you rename your repo:
Edit .git/config and change from:
git remote add origin git@bitbucket.org:myname/myproject.git
to:
git remote add origin git@bitbucket.org:myname/my_new_project_name.git