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 rectify this issue? I've carried out the following:
git init .
git remote add origin [email protected]:myname/myproject.git
git add .
git commit -m "..."
git push <<< error occurs here
I've set-up BitBucket with the ssh key and repo is shown on dashboard.
In my case, the git repository was duplicated somehow in the config file:
cat .git/config
gave me:
[remote "origin"] url = [email protected]:myUserName/myRepositoryName.git/myRepositoryName.git fetch = +refs/heads/*:refs/remotes/origin/*
As you can see, myRepositoryName is duplicated, so I removed that, and now the config file looks like this:
[remote "origin"] url = [email protected]:myUserName/myRepositoryName.git fetch = +refs/heads/*:refs/remotes/origin/*
Doing this, my problem is solved. Now the push is correctly done. Hope this help someone.
This error also occur when you rename your repo:
Edit .git/config and change from:
git remote add origin [email protected]:myname/myproject.git
to:
git remote add origin [email protected]:myname/my_new_project_name.git
I managed to do this in the end by removing the origin and re-adding it. Everything seemed ok after I did this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With