View Gerrit code for empty repo not working

I installed and configured my own Gerrit server. I created a repository using web gui for Gerrit. I can successfully clone this empty repository using the git command, so the setup seems fine. Then I:

  • configured my access: git config --global user.email ... , git config --global user.name ... ,

  • remote added: git add remote origin myUser@myGitHost :29418/project.git ,

  • created and launched file: git add file , git commit -m "first commit" .

So far so good.

But when I try to push it to my repo, I get the output:

 myUser@myGitHost :~/project$ git push origin master Counting objects: 7, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (6/6), 525 bytes, done. Total 6 (delta 0), reused 0 (delta 0) remote: Processing changes: refs: 1, done To ssh:// myUser@myGitHost :29418/project.git ! [remote rejected] master -> master (can not update the reference as a fast forward) error: failed to push some refs to 'ssh:// myUser@myGitHost :29418/project.git' 

I tried to find a solution. " git pull origin master " does not work. Pressing the -f button also does not work.

Can anybody help me?

EDIT: output push -f:

 myUser@myGitHost :~/project$ git push -f origin master Counting objects: 7, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (6/6), 525 bytes, done. Total 6 (delta 0), reused 0 (delta 0) remote: Processing changes: refs: 1, done To ssh:// myUser@myGitHost :29418/project.git ! [remote rejected] master -> master (can not update the reference as a fast forward) error: failed to push some refs to 'ssh:// myUser@myGitHost :29418/project.git' 

What I mean by "w22> pull origin master" is that most ppl solutions mention that you need to do a click before clicking, for example: http://rip747.wordpress.com/2009/04/20 / git-push-rejected-non-fast-forward / . These outputs:

 myUser@myGitHost :~/project$ git pull origin master From ssh://myGitHost:29418/project * branch master -> FETCH_HEAD Already up-to-date. 

But when I do push, the output remains the same:

cannot update the link as fast forward.

+7
source share
1 answer

Are you trying to bypass the Gerrit code verification function? If not, try git push origin HEAD:refs/for/master

+6
source

All Articles