Gitlab 6.1 push被拒绝/错误 [英] Gitlab 6.1 push Rejected / Error

查看:238
本文介绍了Gitlab 6.1 push被拒绝/错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



现在我通过5.4和6.0升级到gitlab 6.1,现在我不能推。



在服务器上安装检查:

  root @ ks:/ home / git / gitlab #sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV = production 

系统信息
系统:Debian 6.0.7
当前用户:git
使用RVM:no
Ruby版本:1.9.3p327
Gem版本:2.1.8
Bundler版本:1.3.5
Rake版本:10.1.0

GitLab信息
版本:6.1.0
修订版本:b595503
目录:/ home / git / gitlab
DB适配器:mysql2
URL:http:// git.gigadi.org
HTTP克隆URL:http://git.gigadi.org/some-project.git
SSH克隆URL:git@git.gigadi.org:some-project.git
使用LDAP:no
使用Omniauth:no

GitLab Shell
版本:1.7.1
存储库:/ home / git / repositories /
钩子:/ home / git / gitlab-shell / hooks /
git:/ usr / bin / git



root @ ks:/ home / git / gitlab#sudo -u git -H bundle exec rake gitlab:check RAILS_ENV =生产
检查环境...

Git配置为git用户? ...是
有python2? ...是
python2是支持版本? ...是

检查环境...已完成

检查GitLab Shell ...

GitLab Shell版本> = 1.7.1? ... OK(1.7.1)
Repo基本目录存在? ...是
Repo base目录是一个符号链接? ... no
由git拥有的回购基地:git? ...是
回购基地访问是drwxrws ---? ...是
更新挂钩最新? ...是
repos中的更新钩子是链接:...


检查GitLab Shell ...已完成

检查Sidekiq ...

运行? ...是

检查Sidekiq ...已完成

检查GitLab ...

数据库配置存在? ...是
数据库是SQLite ...否
所有迁移? ...是
GitLab配置存在? ...是
GitLab配置过时? ... no
日志目录可写? ...是
Tmp目录可写? ...是
初始化脚本存在? ...是
Init脚本最新? ...是
项目有命名空间:...

项目有卫星? ...

Redis版本> = 2.0.0? ...是
您的git bin路径是/ usr / bin / git
Git版本> = 1.7.10? ...是(1.8.3)

检查GitLab ...已完成

当我在本地机器上尝试时:

  GIT_SSH ='ssh -v'git push -f http:// mydomain .org / xxx / xxx.git master 

结果是:

 计数对象:154,完成。 
使用多达4个线程的Delta压缩。
压缩对象:100%(135/135),完成。
写入对象:100%(154/154),184.75 KiB,完成。
总计154(增量22),重新使用0(delta 0)
remote:/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/ dsl.rb:33:在`eval_gemfile'中:Gemfile语法错误:(Bundler :: GemfileError)
remote:/ home / git / gitlab / Gemfile:14:语法错误,意外的':',expecting $ end
remote:gemmysql2,group::mysql
remote:^
remote:from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5 /lib/bundler/dsl.rb:9:in`evaluate'
remote:from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition .rb:19:在`build'
remote:从/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:148:in`定义'
remote:from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:116:in`setup'
remote:from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17
remote:error:hook拒绝更新refs / heads / master
到http://mydomain.org/xxx/xxx.git
! [远程拒绝]主 - > (钩子拒绝)
错误:无法推一些参考文献'http://mydomain.org/xxx/xxx.git'

我在debian 6.0.7中使用gitlab与apache



哪里有问题?

解决方案

我解决了我的问题:

  vim / home / git / gitlab-shell / hooks / update 

$ b $更改第一行b

 #!/ usr / bin / env ruby​​ 
$ / pre>

TO

 #!/ usr / local / bin / ruby​​ 

现在我的推动工作正常!



想想 VonC


Before i use gitlab 5.3 and all works fine.

Now i upgrade to gitlab 6.1 via 5.4 and 6.0 and now i can't push.

İnstallation check on server:

root@ks:/home/git/gitlab# sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

System information
System:     Debian 6.0.7
Current User:   git
Using RVM:  no
Ruby Version:   1.9.3p327
Gem Version:    2.1.8
Bundler Version:1.3.5
Rake Version:   10.1.0

GitLab information
Version:    6.1.0
Revision:   b595503
Directory:  /home/git/gitlab
DB Adapter: mysql2
URL:        http://git.gigadi.org
HTTP Clone URL: http://git.gigadi.org/some-project.git
SSH Clone URL:  git@git.gigadi.org:some-project.git
Using LDAP: no
Using Omniauth: no

GitLab Shell
Version:    1.7.1
Repositories:   /home/git/repositories/
Hooks:      /home/git/gitlab-shell/hooks/
Git:        /usr/bin/git



root@ks:/home/git/gitlab# sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
Checking Environment ...

Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 1.7.1 ? ... OK (1.7.1)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
update hook up-to-date? ... yes
update hooks in repos are links: ... 


Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes

Checking Sidekiq ... Finished

Checking GitLab ...

Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ... 

Projects have satellites? ... 

Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.8.3)

Checking GitLab ... Finished

When i try in my local machine:

GIT_SSH='ssh -v' git push -f http://mydomain.org/xxx/xxx.git master

The result is:

Counting objects: 154, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (135/135), done.
Writing objects: 100% (154/154), 184.75 KiB, done.
Total 154 (delta 22), reused 0 (delta 0)
remote: /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/dsl.rb:33:in `eval_gemfile': Gemfile syntax error: (Bundler::GemfileError)
remote: /home/git/gitlab/Gemfile:14: syntax error, unexpected ':', expecting $end
remote: gem "mysql2", group: :mysql
remote:                     ^
remote:     from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/dsl.rb:9:in `evaluate'
remote:     from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:19:in `build'
remote:     from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'
remote:     from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:116:in `setup'
remote:     from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17
remote: error: hook declined to update refs/heads/master
To http://mydomain.org/xxx/xxx.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'http://mydomain.org/xxx/xxx.git'

i Use gitlab in debian 6.0.7 with apache

Where is the probleme?

解决方案

I solve my problem like this:

vim /home/git/gitlab-shell/hooks/update

change first line from

#!/usr/bin/env ruby

TO

#!/usr/local/bin/ruby

Now my push work fine!

Thinks VonC

这篇关于Gitlab 6.1 push被拒绝/错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆