Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git error: conq: repository does not exist

Tags:

git

bitbucket

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.

like image 708
jaffa Avatar asked Jan 19 '12 13:01

jaffa


3 Answers

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.

like image 160
Malloc Avatar answered Sep 23 '22 19:09

Malloc


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
like image 31
Igor Parra Avatar answered Sep 23 '22 19:09

Igor Parra


I managed to do this in the end by removing the origin and re-adding it. Everything seemed ok after I did this.

like image 30
jaffa Avatar answered Sep 22 '22 19:09

jaffa