[go: up one dir, main page]

Skip to content

Pre-receive hook issue

Hi i'm having issues with gitlab currently and not sure if this is related with #3595 (closed)

Web Ide is having error when committing on new branch but will still create the branch Screen_Shot_2021-11-11_at_9.50.40_PM

Merge Requests are failing, but still merging the code changess Screen_Shot_2021-11-11_at_10.46.36_PM Screen_Shot_2021-11-11_at_10.49.20_PM

some logs

{
  "severity": "ERROR",
  "time": "2021-11-11T14:14:57.252Z",
  "correlation_id": "01FM7NKZM3H5722NTWQKHJFDHH",
  "exception.class": "Gitlab::Git::PreReceiveError",
  "exception.message": "",
  "exception.backtrace": [
    "lib/gitlab/gitaly_client/operation_service.rb:351:in `user_commit_files'",
    "lib/gitlab/git/repository.rb:901:in `block in multi_action'",
    "lib/gitlab/git/wraps_gitaly_errors.rb:7:in `wrapped_gitaly_errors'",
    "lib/gitlab/git/repository.rb:900:in `multi_action'",
    "app/models/repository.rb:825:in `block in multi_action'",
    "app/models/repository.rb:808:in `with_cache_hooks'",
    "app/models/repository.rb:825:in `multi_action'",
    "app/services/files/multi_service.rb:41:in `commit_actions!'",
    "app/services/files/multi_service.rb:13:in `create_commit!'",
    "app/services/commits/create_service.rb:30:in `execute'",
    "lib/api/commits.rb:133:in `block (2 levels) in <class:Commits>'",
    "lib/api/api_guard.rb:213:in `call'",
    "lib/gitlab/middleware/speedscope.rb:13:in `call'",
    "lib/gitlab/request_profiler/middleware.rb:17:in `call'",
    "lib/gitlab/jira/middleware.rb:19:in `call'",
    "lib/gitlab/middleware/go.rb:20:in `call'",
    "lib/gitlab/etag_caching/middleware.rb:21:in `call'",
    "lib/gitlab/middleware/multipart.rb:172:in `call'",
    "lib/gitlab/middleware/read_only/controller.rb:50:in `call'",
    "lib/gitlab/middleware/read_only.rb:18:in `call'",
    "lib/gitlab/middleware/same_site_cookies.rb:27:in `call'",
    "lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'",
    "lib/gitlab/middleware/basic_health_check.rb:25:in `call'",
    "lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'",
    "lib/gitlab/middleware/request_context.rb:21:in `call'",
    "config/initializers/fix_local_cache_middleware.rb:11:in `call'",
    "lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'",
    "lib/gitlab/metrics/requests_rack_middleware.rb:74:in `call'",
    "lib/gitlab/middleware/release_env.rb:12:in `call'"
  ],
  "user.username": "jethro",
  "tags.program": "web",
  "tags.locale": "en",
  "tags.feature_category": "source_code_management",
  "tags.correlation_id": "01FM7NKZM3H5722NTWQKHJFDHH"
}

I tried creating the custom hooks, added the following to gitlab.rb

gitaly['custom_hooks_dir'] = "/var/opt/gitlab/gitaly/custom_hooks"

created 2 files in that directory /var/opt/gitlab/gitaly/custom_hooks/pre-receive

#!/bin/sh
exit 0

/var/opt/gitlab/gitaly/custom_hooks/post-receive

#!/bin/sh
exit 0
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information