Error 500 and invalid byte sequence in UTF-8 in ref.rb:24:in `split'
Created by: athornz
I've recently setup gitlab, and quite a number of my existing repositories give a 500 error when trying to view the project in gitlab, and when I run a gitlab:check, it fails with the error invalid byte sequence in UTF-8.
Here is the output of gitlab:env:info (urls removed):
System information
System: CentOS 6.5
Current User: git
Using RVM: no
Ruby Version: 2.1.0p0
Gem Version: 2.2.0
Bundler Version:1.5.1
Rake Version: 10.1.0
GitLab information
Version: 6.4.3
Revision: 180ab97
Directory: /home/git/gitlab
DB Adapter: postgresql
URL:
HTTP Clone URL:
SSH Clone URL:
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.8.0
Repositories: /mnt/git/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git
And here is the output of bundle exec rake gitlab:check RAILS_ENV=production (repo names renamed):
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.9 ? ... OK (1.8.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
update hook up-to-date? ... yes
update hooks in repos are links: ...
libraries / a ... ok
libraries / b ... missing
Try fixing it:
sudo -u git ln -sf /home/git/gitlab-shell/hooks/update /mnt/git/libraries/b.git/hooks/update
For more information see:
/home/git/gitlab-shell/support/rewrite-hooks.sh
Please fix the error above and rerun the checks.
android / c ... ok
android / d ... ok
android / e ... ok
android / f ... ok
android / g ... ok
android / h ... ok
android / i ... ok
android / j ... ok
android / k ... rake aborted!
invalid byte sequence in UTF-8
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/gitlab-grit-2.6.3/lib/grit/ref.rb:24:in `split'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/gitlab-grit-2.6.3/lib/grit/ref.rb:24:in `find_all'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/gitlab-grit-2.6.3/lib/grit/repo.rb:212:in `heads'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/gitlab_git-4.0.0.pre/lib/gitlab_git/repository.rb:46:in `branches'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/gitlab_git-4.0.0.pre/lib/gitlab_git/repository.rb:41:in `branch_names'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/gitlab_git-4.0.0.pre/lib/gitlab_git/repository.rb:84:in `discover_default_branch'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/gitlab_git-4.0.0.pre/lib/gitlab_git/repository.rb:29:in `initialize'
/home/git/gitlab/app/models/repository.rb:8:in `new'
/home/git/gitlab/app/models/repository.rb:8:in `initialize'
/home/git/gitlab/app/models/project.rb:163:in `new'
/home/git/gitlab/app/models/project.rb:163:in `repository'
/home/git/gitlab/app/models/project.rb:350:in `empty_repo?'
/home/git/gitlab/lib/tasks/gitlab/check.rake:529:in `block in check_repos_update_hooks_is_link'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/relation/batches.rb:26:in `block (2 levels) in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/relation/batches.rb:26:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/relation/batches.rb:26:in `block in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/relation/batches.rb:75:in `find_in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-deprecated_finders-1.0.3/lib/active_record/deprecated_finders/relation.rb:70:in `find_in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/relation/batches.rb:25:in `find_each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/querying.rb:8:in `find_each'
/home/git/gitlab/lib/tasks/gitlab/check.rake:526:in `check_repos_update_hooks_is_link'
/home/git/gitlab/lib/tasks/gitlab/check.rake:379:in `block (3 levels) in <top (required)>'
Tasks: TOP => gitlab:check => gitlab:gitlab_shell:check
(See full trace by running task with --trace)
I haven't been able to find any relevant info by googling the error.