Gitlab doesn't accept pushes of filenames not in UTF-8 (remote: GitLab: API is not accessible and pre-receive hook declined)
Summary
Gitlab doesn't accept pushes of commits with files whose filenames are not UTF-8. Fails with remote: GitLab: API is not accessible
and pre-receive hook declined
.
Possibly related to https://gitlab.com/gitlab-org/gitlab-ce/issues/7039
Steps to reproduce
- Create new, empty Git repository on Gitlab.com or in on-premise instance
- Clone the new repository to a local working copy
- Change directory to the working copy
- Download and extract the attached non_utf8_chars.zip into the working copy of the new repository
- Some ZIP tools seem to convert the non-UTF-8 characters to proper UTF-8 on extraction. Use the
unzip
commandline tool on Ubuntu (apt-get install unzip
) which does not convert the filenames.
git add .
git commit -m"Add files with non-UTF-8 filenames"
git push -u origin master
The last step will fail with an error message like this:
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 389 bytes | 389.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: API is not accessible
To ssh://repo.risedev.at:1850/daff/testproject1.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@repo.example.com:22/antaflos/testproject.git'
What is the current bug behavior?
Git has no problems committing files with non-UTF-8 filenames, but Gitlab does not accept them.
What is the expected correct behavior?
If Git supports committing non-UTF-8 filenames then Gitlab should accept them as well.
Relevant logs and/or screenshots
In /var/log/gitlab/gitlab-rails/production.log
a gigantic stacktrace occurs:
ArgumentError (invalid byte sequence in UTF-8):
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/core_ext/object/blank.rb:117:in `==='
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/core_ext/object/blank.rb:117:in `blank?'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/rev_list.rb:98:in `block in objects_from_output'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `to_a'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/blob.rb:68:in `batch_lfs_pointers'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/lfs_changes.rb:14:in `block in new_pointers'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/rev_list.rb:85:in `block in get_objects'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/popen.rb:26:in `block in popen'
/opt/gitlab/embedded/lib/ruby/2.3.0/open3.rb:205:in `popen_run'
/opt/gitlab/embedded/lib/ruby/2.3.0/open3.rb:95:in `popen3'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/popen.rb:21:in `popen'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/rev_list.rb:69:in `lazy_execute'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/rev_list.rb:82:in `get_objects'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/rev_list.rb:33:in `new_objects'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/lfs_changes.rb:11:in `new_pointers'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/checks/lfs_integrity.rb:14:in `objects_missing?'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/checks/change_access.rb:145:in `lfs_objects_exist_check'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/checks/change_access.rb:40:in `exec'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git_access.rb:212:in `check_single_change_access'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git_access.rb:201:in `block in check_change_access!'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/changes_list.rb:12:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/changes_list.rb:12:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git_access.rb:198:in `check_change_access!'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git_access.rb:179:in `check_push_access!'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git_access.rb:52:in `check'
/opt/gitlab/embedded/service/gitlab-rails/lib/api/internal.rb:49:in `block (2 levels) in <class:Internal>'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:57:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:57:in `block (2 levels) in generate_api_method'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in `instrument'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:56:in `block in generate_api_method'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:262:in `block in run'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in `instrument'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:243:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:313:in `block in build_stack'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:31:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:24:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:31:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:24:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape_logging-1.7.0/lib/grape_logging/middleware/request_logger.rb:60:in `block in call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape_logging-1.7.0/lib/grape_logging/middleware/request_logger.rb:58:in `catch'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape_logging-1.7.0/lib/grape_logging/middleware/request_logger.rb:58:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:24:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-oauth2-1.2.3/lib/rack/oauth2/server/resource.rb:20:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-oauth2-1.2.3/lib/rack/oauth2/server/resource/bearer.rb:8:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/middleware/error.rb:34:in `block in call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/middleware/error.rb:33:in `catch'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/middleware/error.rb:33:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:24:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/head.rb:13:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:227:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:221:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/router/route.rb:72:in `exec'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:119:in `process_route'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:74:in `block in identity'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:93:in `transaction'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:72:in `identity'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:57:in `block in call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:135:in `with_optimization'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:56:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/api.rb:119:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/api.rb:45:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.0/lib/grape/api.rb:40:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/routing/mapper.rb:51:in `serve'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:30:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:30:in `serve'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/routing/route_set.rb:817:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/peek-performance_bar-1.3.0/lib/peek/views/performance_bar/process_utilization.rb:120:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/omniauth-1.4.2/lib/omniauth/strategy.rb:186:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/omniauth-1.4.2/lib/omniauth/strategy.rb:164:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/multipart.rb:93:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/request_profiler/middleware.rb:14:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/go.rb:18:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/flipper-0.10.2/lib/flipper/middleware/memoizer.rb:55:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/etag_caching/middleware.rb:11:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/batch-loader-1.1.1/lib/batch_loader/middleware.rb:11:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-attack-4.4.1/lib/rack/attack.rb:107:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:35:in `block in call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `catch'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-cors-0.4.0/lib/rack/cors.rb:80:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/etag.rb:24:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/conditionalget.rb:38:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/head.rb:13:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/read_only.rb:31:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/flash.rb:260:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/session/abstract/id.rb:225:in `context'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/session/abstract/id.rb:220:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activerecord-4.2.10/lib/active_record/query_cache.rb:36:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/rack/logger.rb:38:in `call_app'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/rack/logger.rb:20:in `block in call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:26:in `tagged'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:68:in `tagged'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/rack/logger.rb:20:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/request_context.rb:18:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/methodoverride.rb:22:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/runtime.rb:18:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/lock.rb:17:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/sendfile.rb:113:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/sentry-raven-2.5.3/lib/raven/integrations/rack.rb:50:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/engine.rb:518:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/application.rb:165:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/railtie.rb:194:in `public_send'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/railtie.rb:194:in `method_missing'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/urlmap.rb:66:in `block in call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/urlmap.rb:50:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/urlmap.rb:50:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:562:in `process_client'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-worker-killer-0.4.4/lib/unicorn/worker_killer.rb:52:in `process_client'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:658:in `worker_loop'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:132:in `start'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'
/opt/gitlab/embedded/bin/unicorn:23:in `load'
/opt/gitlab/embedded/bin/unicorn:23:in `<top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `load'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `kernel_load'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in `exec'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
The failing pre-receive hook is apparently /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_net.rb
. The gitlab-shell log in /var/log/gitlab/gitlab-shell/gitlab-shell.log
also shows an error:
I, [2018-01-03T18:32:13.298583 #7266] INFO -- : POST http://127.0.0.1:8080/api/v4/internal/allowed 0.09872
I, [2018-01-03T18:32:13.298924 #7266] INFO -- : gitlab-shell: executing git command <git-receive-pack /projects/gitlab/git-data/repositories/antaflos/testproject.git> for user with key key-28.
I, [2018-01-03T18:32:13.597307 #7275] INFO -- : POST http://127.0.0.1:8080/api/v4/internal/allowed 0.06512
E, [2018-01-03T18:32:13.597482 #7275] ERROR -- : API call <POST http://127.0.0.1:8080/api/v4/internal/allowed> failed: 500 => <{"message":"500 Internal Server Error"}>.
Output of checks
This bug happens on GitLab.com as well as in on-premise instances.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 16.04 Current User: git Using RVM: no Ruby Version: 2.3.5p376 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.4 Go Version: unknownGitLab information Version: 10.3.2 Revision: 5fbc5f2 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://repo.example.com HTTP Clone URL: https://repo.example.com/some-group/some-project.git SSH Clone URL: ssh://git@repo.example.com:22/some-group/some-project.git Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 5.10.2 Repository storage paths:
- default: /projects/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git