LoginSignup
2
2

More than 5 years have passed since last update.

gitbucketにpushするときにエラーが発生する

Posted at

Environment

  • gitbucket version: 3.6
  • local git version: 2.4.3

Problem

gitbucketにpushするときに以下のエラーが発生した

$ git push
Counting objects: 42, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (41/41), done.
Writing objects: 100% (42/42), 28.99 KiB | 0 bytes/s, done.
Total 42 (delta 24), reused 0 (delta 0)
remote: error: Internal server error
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'http://xxx.git'

gitbucketのログには以下のようなエラーが表示されていた

# /var/log/upstart/gitbucket.log

2015-11-09 15:57:38.451:WARN:/:Internal error during receive-pack
org.eclipse.jgit.errors.PackProtocolException: error: invalid protocol: wanted 'old new ref'
    at org.eclipse.jgit.transport.BaseReceivePack.recvCommands(BaseReceivePack.java:935)
    at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:184)
    at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:160)
    at org.eclipse.jgit.http.server.ReceivePackServlet.doPost(ReceivePackServlet.java:187)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)

Solution

参考: http://stackoverflow.com/questions/21557004/protocol-error-expected-old-new-ref-got-shallow-deeb

unshallowした後にpushすると成功した

$ git fetch --unshallow
$ git push
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2