2

I am using a python package called pre-commit to standardize the git workflow for my team.

I am having some issues setting up a pre-commit hooks with this package https://github.com/pre-commit/mirrors-mypy due to company proxy with github.

I decided to download the package and upload it to our local bitbuket server and setup pre commit for it to use as a local repo.

Here's my .pre-commit-config.yaml file

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
-   repo: http://localserver/scm/~username/local_mypy.git
    rev: '03f936cbf67'
    hooks:
    -   id: mypy

I then ran pre-commit install and in the my git bash I did

git commit -a -m"let's see if pre-commit works"

But the result I get is

[INFO] Installing environment for http://localserver/scm/~username/local_mypy.git.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('H:\\.cache\\pre-commit\\repo3yl4ty_p\\py_env-python3.6\\Scripts\\python.EXE', '-mpip', 'install', '.')
return code: 1
expected return code: 0
stdout:
    Processing h:\.cache\pre-commit\repo3yl4ty_p
    Could not fetch URL https://pypi.org/simple/mypy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/mypy/ (Caused by SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)) - skipping

stderr:
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)': /simple/mypy/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)': /simple/mypy/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)': /simple/mypy/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)': /simple/mypy/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)': /simple/mypy/
    ERROR: Could not find a version that satisfies the requirement mypy==0.800 (from pre-commit-dummy-package)
    ERROR: No matching distribution found for mypy==0.800

Check the log at H:\.cache\pre-commit\pre-commit.log
4

0 に答える 0