【转载】git push 报错 remote: error: hook declined to update

今天自己的也发生了下面的问题,随手记下有相同经历过程的同学。后面以供参考。

今天push远程仓库的时候出了这么一个错误,网上搜了一下,说修改.git/description,把Unnamed repository后面的内容都删掉

bogon:xxx longer$ git push origin test:test
Counting objects: 49, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (26/26), done.
Writing objects: 100% (26/26), 12.72 KiB | 0 bytes/s, done.
Total 26 (delta 19), reused 0 (delta 0)
remote: /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find celluloid-0.15.2 in any of the sources (Bundler::GemNotFound)
remote: from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `map!'
remote: from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize'
remote: from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
remote: from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
remote: from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
remote: from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
remote: from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
remote: from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
remote: from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `'
remote: from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
remote: from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
remote: error: hook declined to update refs/heads/test
To https://git.oschina.net/xxx/xxx.git
 ! [remote rejected] test -> test (hook declined)
error: failed to push some refs to 'https://git.oschina.net/xxx/xxx.git'

我打开文件后是这样的:

Unnamed repository; edit this file ‘description’ to name the repository.

我没有修改直接退出了,再次push,发现突然好了~~

Thanks God.

地址:
https://my.oschina.net/u/943107/blog/195561

你可能感兴趣的:(git,ubuntu)