1

We've just setup gerrit in house. Some projects work, some don't. The ones that don't work fail like this:

git review -v
2014-02-26 11:54:57.029764 Running: git log --color=never --oneline HEAD^1..HEAD
2014-02-26 11:54:57.032894 Running: git remote
2014-02-26 11:54:57.035826 Running: git branch -a --color=never
2014-02-26 11:54:57.040726 Running: git rev-parse --show-toplevel --git-dir
2014-02-26 11:54:57.043507 Running: git remote update gerrit
Fetching gerrit
2014-02-26 11:54:58.697639 Running: git rebase -i remotes/gerrit/master
2014-02-26 11:54:58.840323 Running: git reset --hard ORIG_HEAD
2014-02-26 11:54:58.850137 Running: git config --get color.ui
2014-02-26 11:54:58.854311 Running: git log --color=always --decorate --oneline HEAD --not remotes/gerrit/master --
2014-02-26 11:54:58.860093 Running: git branch --color=never
2014-02-26 11:54:58.864691 Running: git log HEAD^1..HEAD
Using local branch name "master" for the topic of the change submitted
2014-02-26 11:54:58.872208 Running: git push gerrit HEAD:refs/publish/master
fatal: One or more refs/for/ names blocks change upload
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
2014-02-26 11:55:00.029139 Running: git rev-parse --show-toplevel --git-dir

Contents of .gitview:

[gerrit]
host=gitlab.company.net
project=api/core-services.git

git review -s has been run and remotes are configured:

git remote -v
gerrit  ssh://me@gitlab.company.net:29418/api/core-services.git (fetch)
gerrit  ssh://me@gitlab.company.net:29418/api/core-services.git (push)
origin  git@gitlab.company.net:api/core-services.git (fetch)
origin  git@gitlab.company.net:api/core-services.git (push)

The project doesn't show up in the project list (also missing from UI):

ssh -p 29418 gitlab.company.net gerrit ls-projects | grep core-services
(returns nothing)

But when I try to add the project it already exists (also fails when adding from UI):

ssh -p 29418 gitlab.company.net gerrit create-project api/core-services.git
fatal: project "api/core-services" exists

git for-each-ref refs/for returns nothing.

I am setup as an administrator in gerrit. I can push to origin. Currently working on master since it is a new project. No other branches. Running ubuntu 13.10, git 1.8.3.2 and git-review 1.21 locally. GitLab 6.4.3 3173626, git 1.8.4.4 and Gerrit 2.8.1 on the server. I can submit reviews on other projects.

Right now, the only common thing that I can find between the projects that don't work is that they contain a dash ("-") in the name.

Can anyone point me in the right direction here? Searches haven't turned up anything useful and I'm at my limit of gerrit knowledge.

Thanks.

Eric
  • 51
  • 1
  • 6
  • what is the `git remote show review` telling? – laplasz Feb 26 '14 at 20:09
  • (How do you format line breaks in comments?) `git remote show gerrit * remote gerrit Fetch URL: ssh://me@gitlab.company.net:29418/api/core-services.git Push URL: ssh://me@gitlab.company.net:29418/api/core-services.git HEAD branch: master Remote branch: master tracked Local ref configured for 'git push': master pushes to master (up to date)` – Eric Feb 26 '14 at 20:36
  • check aout this [article](https://review.typo3.org/Documentation/error-change-upload-blocked.html) maybe the refs/for branch already created, so clean everything out – laplasz Feb 26 '14 at 20:39
  • I did mention above that `git for-each-ref refs/for` returns nothing. – Eric Feb 26 '14 at 22:08
  • Are the projects really there, are they created? Did you check on the server if they are present? – uncletall Feb 28 '14 at 00:33

1 Answers1

1

Seems like git review is trying to push like this

HEAD:refs/publish/master

It should push like this

 HEAD:refs/for/master