1. 程式人生 > 其它 >Unknown SSL protocol error in connection to github.com:443

Unknown SSL protocol error in connection to github.com:443

報錯

 fatal: unable to access 'https://github.com/ibeltagy/transformers.git/': Unknown SSL protocol error in connection to github.com:443
  error: subprocess-exited-with-error

  × git clone --quiet https://github.com/ibeltagy/transformers.git 'C:\Users\LiuSh\AppData\Local\Temp\pip-install-_6pm_y49\transformers_b021575b11434df588be9ff5e3463475' did not run successfully.
  │ exit code: 128
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git clone --quiet https://github.com/ibeltagy/transformers.git 'C:\Users\LiuSh\AppData\Local\Temp\pip-install-_6pm_y49\transformers_b021575b11434df588be9ff5e3463475' did not run successfully.
│ exit code: 128
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

安裝requirements.txt報錯,裡面有git,如:

transformers @ git+http://github.com/ibeltagy/transformers.git@longformer_encoder_decoder#egg=transformers

解決

1.新開一個cmd,輸入

git config http.sslVerify "false"

2.使用pip命令安裝

pip install git+https://github.com/ibeltagy/transformers.git@longformer_encoder_decoder#egg=transformers