Git error: conq: repository does not exist
Asked Answered
P

14

38

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.

Pontefract answered 19/1, 2012 at 13:44 Comment(1)
Side node: I got this because VSCode thought it would be smart and replaced my spaces with %20's; then as a result it was trying to execute a clone of my local file path instead of the repo name...Damp
P
15

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

Pontefract answered 30/1, 2012 at 18:59 Comment(4)
what do you mean by "removing the origin" exactly?Superadd
nevermind. My bug was different =(i'll write it in a separate answer)Superadd
Also for me it works. Remove origin with "git origin rm namebranch" and re-add with "git origin add bitbucketlink". Good!Ammoniate
Sharing my answer for future readersTess
T
39

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.

Tacy answered 27/11, 2012 at 20:28 Comment(1)
I changed the remote repository and in order to fix this I also had to removed the /shared/cached-copy folder.Allegorist
E
28

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
Electroform answered 26/1, 2014 at 20:2 Comment(3)
Or when you change your username. [email protected]:name/project.git [email protected]:new_name/project.gitHaunted
This happened to me as well. I transfer my repo to my organization, and this worked for me. Thanks!Galleass
@IgorParra can't believe I forgot. Edit: oh, I remember why I forgot, not enough rep :/Galleass
P
15

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

Pontefract answered 30/1, 2012 at 18:59 Comment(4)
what do you mean by "removing the origin" exactly?Superadd
nevermind. My bug was different =(i'll write it in a separate answer)Superadd
Also for me it works. Remove origin with "git origin rm namebranch" and re-add with "git origin add bitbucketlink". Good!Ammoniate
Sharing my answer for future readersTess
P
15
git remote rm origin
git remote add origin git@github_or_bitbucket_or_whatever_link
Premedical answered 16/10, 2013 at 13:19 Comment(0)
E
3

You get this error if the remote repository hasn't been created. Bitbucket is running a service called conq that handles pushes and you see the error message from it. Simply create a new (empty) repository and the push should succeed.

Here I'm pushing to a non-existing repository:

$ git push [email protected]:mg/testt.git master
conq: repository does not exist.
fatal: The remote end hung up unexpectedly

and here I push to the correct path:

$ git push [email protected]:mg/test.git master
Counting objects: 3, done.
Writing objects: 100% (3/3), 203 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: bb/acl: mg is allowed. accepted payload.
To [email protected]:mg/gtest.git
 * [new branch]      master -> master

The test repository was newly created on Bitbucket. If the problem persists, then I suggest deleting the empty repo from Bitbucket and re-creating it.

Enjambement answered 19/1, 2012 at 13:49 Comment(6)
Strange... I've just double checked and I get exactly the error you describe when I push to a non-existent repository.Enjambement
Is this anything to do with SOPA?Pontefract
No, Bitbucket didn't participate in the blackout yesterday.Enjambement
If I use git push on its own it doesn't work. If I use push with the whole origin path it works. Weird? Is this a bitbucket bug?Pontefract
I can push into a new repo with git push origin master and with `git push <URL> master. Maybe you were just unlucky and they had a small glitch.Enjambement
Hi Martin, "git fetch origin master" failed with the same error. What gives with this?Pontefract
Q
3

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 [email protected]:myname/myproject.git

then I was able to pull and checkout my branch

$ git pull
$ git checkout <branch-name>
Quintilla answered 15/4, 2014 at 1:28 Comment(0)
S
2

Did you encounter this error doing the Rails Tutorial?

I did. And I'm very new to this so I was only doing was the tutorial explicitly told me to do. That got me into trouble because in chapter 3 it says it’s a good idea to create a new repository at Bitbucket and push it up but it doesn't hold your hand through the process like it does in Chapter 2.

Don't forget to create the new repository at BitBucket before pushing to that repository.

From Chapter 2: You should also create a new repository by clicking on the “Create” button at Bitbucket.

I did that and it fixed the problem.

Shreve answered 14/11, 2014 at 15:4 Comment(0)
T
2

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!

Tatting answered 27/10, 2016 at 7:18 Comment(0)
S
1

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 = [email protected]: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).

Superadd answered 2/3, 2013 at 0:5 Comment(0)
J
1

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:

  1. Generate an SSH Key on your server: https://confluence.atlassian.com/display/STASH/Creating+SSH+keys
  2. Follow these instructions to get ssh-agent running, and load in the identity you just created: https://confluence.atlassian.com/display/BITBUCKET/Troubleshoot+SSH+Issues

Once that's finished just go to the Bitbucket repo > Settings > Deploy Keys and copy and paste your newly created key.

Jorrie answered 5/1, 2015 at 5:5 Comment(0)
S
0

In some cases (maybe not yours) you may have to change

url = [email protected]:username/projectname.git/

to

url = https://github.com/username/projectname.git/

using the Nano editor, say:

nano .git/config
Sennar answered 1/9, 2016 at 1:37 Comment(0)
A
0

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.

Ashram answered 4/9, 2016 at 9:33 Comment(0)
D
0

I was able to solve this problem by navigating into the submodule's root directory and using the following command.

git push -v origin master

I stumbled across this at here which also has some other troubleshooting steps that may be of use.

Diligent answered 4/4, 2017 at 15:3 Comment(0)
J
0

My case is that the PC has saved someone's password which can't access to that repo. delete the saved credential to use jenkins' credential or grant credit to him.

That works for me.

Jacquesjacquet answered 25/4, 2023 at 18:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.