Skip to content

Instantly share code, notes, and snippets.

@joglomedia
Created October 16, 2013 19:21
Show Gist options
  • Save joglomedia/7013280 to your computer and use it in GitHub Desktop.
Save joglomedia/7013280 to your computer and use it in GitHub Desktop.
Useful Gitlab Command and Troubleshot
# Check requirement
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
# Check everything is working
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:satellites:create RAILS_ENV=production
# Troubleshot: Commit / Merge Request Error #
Your changes could not be commited, because the file has been changed
Or when clicking on the Accept Merge Request button, nothing happens.
- Solusion:
https://github.com/gitlabhq/gitlabhq/issues/3349#issuecomment-16428700
- Try command:
sudo update-alternatives --config ruby
- If you'running ruby 2.0.0 and resolved this issue by running:
sudo apt-get remove ruby1.8
# Logfile created on 2013-10-16 02:31:18 +0000 by logger.rb/36483
October 16, 2013 02:31 -> ERROR -> Command failed [1]: /usr/bin/git --git-dir=/home/git/gitlab-satellites/hibiniu-dev/woocommerce-ongkir-indonesia/.git push origin master
remote: /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/shared_helpers.rb:2:in `require': no such file to load -- rubygems (LoadError)
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/shared_helpers.rb:2
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/setup.rb:1:in `require'
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/setup.rb:1
remote: error: hook declined to update refs/heads/master
To /home/git/repositories/hibiniu-dev/woocommerce-ongkir-indonesia.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to '/home/git/repositories/hibiniu-dev/woocommerce-ongkir-indonesia.git'
Try command manually from command prompt
root@joglohosting:/home/git/gitlab# /usr/bin/git --git-dir=/home/git/gitlab-satellites/hibiniu-dev/woocommerce-ongkir-indonesia/.git push origin master
Counting objects: 5, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 303 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: hooks/update:10: undefined method `require_relative' for main:Object (NoMethodError)
remote: error: hook declined to update refs/heads/master
To /home/git/repositories/hibiniu-dev/woocommerce-ongkir-indonesia.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to '/home/git/repositories/hibiniu-dev/woocommerce-ongkir-indonesia.git'
root@joglohosting:/home/git/gitlab#
But if i try this command, it works:
root@joglohosting:/home/git/gitlab# sudo -u git -H git --git-dir=/home/git/gitlab-satellites/hibiniu-dev/woocommerce-ongkir-indonesia/.git push origin masterCounting objects: 5, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 303 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To /home/git/repositories/hibiniu-dev/woocommerce-ongkir-indonesia.git
e54878c..7e9d913 master -> master
root@joglohosting:/home/git/gitlab#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment