sds/overcommit · error · Overcommit::Exceptions::GitConfigError
Unable to read from local repo git config: #{result.stderr}
Error message
Unable to read from local repo git config: #{result.stderr} What it means
Error "Unable to read from local repo git config: #{result.stderr}" thrown in sds/overcommit.
Source
Thrown at lib/overcommit/configuration.rb:224
!stored_signature.empty?
end
# Returns whether this configuration should verify itself by checking the
# stored configuration for the repo.
#
# @return [true,false]
def verify_signatures?
return false if ENV['OVERCOMMIT_NO_VERIFY']
return true if @hash['verify_signatures'] != false
result = Overcommit::Utils.execute(
%W[git config --local --get #{verify_signature_config_key}]
)
if result.status == 1 # Key doesn't exist
return true
elsif result.status != 0
raise Overcommit::Exceptions::GitConfigError,
"Unable to read from local repo git config: #{result.stderr}"
end
# We don't cast since we want to allow anything to count as "true" except
# a literal zero
result.stdout.strip != '0'
end
# Update the currently stored signature for this hook.
def update_signature!
result = Overcommit::Utils.execute(
%w[git config --local] + [signature_config_key, signature]
)
verify_signature_value = @hash['verify_signatures'] ? 1 : 0
result &&= Overcommit::Utils.execute(
%W[git config --local #{verify_signature_config_key} #{verify_signature_value}]
)View on GitHub (pinned to fee0cd74b2)
Solutions
- Read the git stderr shown in the message for the underlying cause (corrupt config, permission denied, missing git binary) and fix it.
- Check that the directory is a valid Git repository and that `.git/config` is readable by the current user.
- Verify git is installed and on the PATH used by Overcommit.
When it happens
Trigger: Thrown at lib/overcommit/configuration.rb:224 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sds/overcommit@fee0cd74b2 (2026-08-23).
Data as JSON: /api/errors/5d32d7b58e6ea045.
Report an issue: GitHub.