Virtual
Virtual

Reputation: 2191

GERRIT: ! [remote rejected] HEAD -> refs/for/master (internal server error)

It was working fine. Now, when I try to push

git push origin HEAD:refs/for/master

I get,

Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 310 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: refs: 2, done    
To ssh://[email protected]:29412/gerrit_prj_1
 **! [remote rejected] HEAD -> refs/for/master (internal server error)**
error: failed to push some refs to 'ssh://[email protected]:29412/gerrit_prj_1'

In the gerrit_server error log, i see,

[2014-01-16 15:57:03,722] ERROR com.google.gerrit.server.git.ReceiveCommits : Only 0 of 1 new change refs created in gerrit_prj_1; aborting

I am using gerrit 2.8.13

Please help

Upvotes: 3

Views: 13993

Answers (3)

x young
x young

Reputation: 1

After running git fsck and git gc --prune=now, it can push successfully.

Upvotes: 0

Alvand
Alvand

Reputation: 141

I use VSCode. I got this error today when I tried to push my repository to GitHub:

! [remote rejected] master -> master (Internal Server Error)
error: failed to push some refs to 'https://github.com/xxx/yyy.git'

It happened several times. Then I just pulled the repository and then pushed it again and the problem resolved.

Upvotes: 2

Anish Perumpilly
Anish Perumpilly

Reputation: 21

For me it worked by just logging into my repository from ssh >> ssh [email protected] It connected as the repository key were already in my computer. Then , git pushed my code to master >> git push origin master

Upvotes: 2

Related Questions