Running `pre-commit` 1.20.0 on Guix gives server certificate verification failed. CAfile: none CRLfile: none
Running `pre-commit` 1.20.0 on Guix gives

```
An unexpected error has occurred: CalledProcessError: Command: ('/home/igankevich/.guix-profile/bin/git', 'fetch', 'origin', '--tags')
Return code: 128
Expected return code: 0
Output: (none)
Errors:
    fatal: unable to access 'https://github.com/pre-commit/pre-commit-hooks/': server certificate verification failed. CAfile: none CRLfile: none

Traceback (most recent call last):
  File "/gnu/store/35ppc0zpffbzc6zsw9xnks1hxmr7wh19-python-pre-commit-1.20.0/lib/python3.7/site-packages/pre_commit/store.py", line 168, in clone_strategy
    self._shallow_clone(ref, _git_cmd)
  File "/gnu/store/35ppc0zpffbzc6zsw9xnks1hxmr7wh19-python-pre-commit-1.20.0/lib/python3.7/site-packages/pre_commit/store.py", line 150, in _shallow_clone
    git_cmd('-c', git_config, 'fetch', 'origin', ref, '--depth=1')
  File "/gnu/store/35ppc0zpffbzc6zsw9xnks1hxmr7wh19-python-pre-commit-1.20.0/lib/python3.7/site-packages/pre_commit/store.py", line 165, in _git_cmd
    cmd_output_b('git', *args, cwd=directory, env=env)
  File "/gnu/store/35ppc0zpffbzc6zsw9xnks1hxmr7wh19-python-pre-commit-1.20.0/lib/python3.7/site-packages/pre_commit/util.py", line 147, in cmd_output_b
    returncode, cmd, retcode, output=(stdout_b, stderr_b),
pre_commit.util.CalledProcessError: Command: ('/home/igankevich/.guix-profile/bin/git', '-c', 'protocol.version=2', 'fetch', 'origin', 'v2.4.0', '--depth=1')
Return code: 128
Expected return code: 0
Output: (none)
Errors:
    fatal: unable to access 'https://github.com/pre-commit/pre-commit-hooks/': server certificate verification failed. CAfile: none CRLfile: none
```

It looks like pre-commit sanitises GIT_SSL_CAINFO environment variable. Guix uses this variable to specify the path to the certificates. I fixed this bug by _whitelisting_ GIT_SSL_CAINFO in `no_git_env` in `pre_commit/git.py`.
diff --git a/pre_commit/git.py b/pre_commit/git.py
index 3ee9ca3..c8faf60 100644
--- a/pre_commit/git.py
+++ b/pre_commit/git.py
@@ -32,7 +32,7 @@ def no_git_env(_env=None):
     return {
         k: v for k, v in _env.items()
         if not k.startswith('GIT_') or
-        k in {'GIT_EXEC_PATH', 'GIT_SSH', 'GIT_SSH_COMMAND'}
+        k in {'GIT_EXEC_PATH', 'GIT_SSH', 'GIT_SSH_COMMAND', 'GIT_SSL_CAINFO'}
     }
 
 
['pre_commit/git.py']