2

В в git version 2.5.0.windows.1 пытаюсь клонировать хранилище:

$ git clone https://gitlab1645.mydomen.com:8888/project/project-core.git

Получаю сообщение:

Cloning into 'project-core'...
fatal: unable to access 'https://gitlab1645.mydomen.com:8888/project/project-core.git/': SSL certificate problem: unable to get local issuer certificate

Как это победить?

2 ответа 2

14

Есть несколько вариантов:

  1. Использовать SSH при работе с git

  2. Отключить проверку ssl сертификата при клонировании

    GIT_SSL_NO_VERIFY=true git clone /path/to/repo
    
  3. Отключить проверку ssl сертификата глобально

    git config --global http.sslVerify false
    
  4. Если сертификат самоподписанный - найти инструкцию по добавлению самоподписанного сертификата в доверенные.

2
  • Насчет "не использовать SSL" из предыдущего ответа можно уточнить, что стоит попробовать просто http.
    – lxy
    3 авг 2018 в 13:50
  • Спасибо за ответ! Сразу воспользовался третьим способом. 6 апр 2020 в 8:20
1

Еще вот вариант

git config --global http.sslbackend schannel

Вот в оригинале, SSL отключать плохой вариант.

The problem is that git by default using the "Linux" crypto backend.

Beginning with Git for Windows 2.14, you can now configure Git to use SChannel, the built-in Windows networking layer as the crypto backend. This means that you it will use the Windows certificate storage mechanism and you do not need to explicitly configure the curl CA storage mechanism: https://msdn.microsoft.com/en-us/library/windows/desktop/aa380123(v=vs.85).aspx

Just execute:

git config --global http.sslbackend schannel That should helps.

Using schannel is by now the standard setting when installing git for windows, also it is recommended to not checkout repositories by SSH anmore if possible, as https is easier to configure and less likely to be blocked by a firewall it means less chance of failure.

1
  • Так как это русскоязычный ресурс, к приводимым цитатам желательно добавить вольный перевод.
    – user207200
    25 авг 2020 в 14:01

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.