OVERVIEW
Gitlab拉推不工作
我在Ubuntu 13.10本地Gitlab服務器,我得到了下面的輸出,這些命令
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System: Ubuntu 13.10
Current User: git
Using RVM: no
Ruby Version: 2.0.0p247
Gem Version: 2.0.3
Bundler Version:1.5.3
Rake Version: 10.1.0
GitLab information
Version: 6.0.2
Revision: 10b0b8f
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://192.168.0.104
HTTP Clone URL: http://192.168.0.104/some-project.git
SSH Clone URL: [email protected]:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.7.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git
[email protected]:/home/git/gitlab$ cd /home/git/
現在我成功地登錄到與[email protected]服務器並創建成員和項目。然後當我通過git clone http://192.168.0.104/sss/testgitlab.git
克隆到名爲testgitlab的新項目 我可以克隆項目。
PROBLEM
1.當我嘗試提交項目時,我可以這樣做。 commiting項目的時候我儘量拉項目git pull origin master
然後下面的錯誤後出現:
:~/Desktop/testgitlab$ git pull origin master
Username for 'http://192.168.0.104': sss
Password for 'http://[email protected]':
fatal: Couldn't find remote ref master
Unexpected end of command stream
2後,我得到不成功的拉動項目我試圖推動項目:
~/Desktop/testgitlab$ git push origin master
Username for 'http://192.168.0.104': sss
Password for 'http://[email protected]':
Counting objects: 3, done.
Writing objects: 100% (3/3), 220 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find json-1.7.7 in any of the sources (Bundler::GemNotFound)
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/spec_set.rb:85:in `map!'
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/spec_set.rb:85:in `materialize'
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/definition.rb:133:in `specs'
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/definition.rb:178:in `specs_for'
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/definition.rb:167:in `requested_specs'
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/environment.rb:18:in `requested_specs'
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:13:in `setup'
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler.rb:119:in `setup'
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/setup.rb:17:in `<top (required)>'
remote: from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
remote: from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
remote: error: hook declined to update refs/heads/master
To http://192.168.0.104/username/testgitlab.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'http://192.168.0.104/sss/testgitlab.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.0 ? ... OK (1.7.0)
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
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ...
Administrator/sesh ... repository is empty
sss/TestGitlab ... repository is empty
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 satellites? ...
Administrator/sesh ... can't create, repository is empty
sss/TestGitlab ... can't create, repository is empty
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
我想不通,我錯過了什麼.... 幫我個忙。 謝謝你advace!