Installation of certificate in GIT

מתוך ויקי נטפרי
גרסה מ־20:05, 30 באוגוסט 2022 מאת DLipson (שיחה | תרומות) (Removed duplicate option)
קפיצה לניווט קפיצה לחיפוש

לעברית לחצו כאן

To switch from edit view to read view

To search in the Wiki


Home page > Security certificate > Installation of certificate in GIT ‎‎

Update: as of 3 May 2019, a new certificate installation software was released, the new software automatically installs the certificate also in GIT[1].


Download this file Curl-ca-bundle.zip And extract its contents.


Run the following command, depending on the location of the certificate file you extracted.

In Windows systems, in case you have installed the security certificate installation software, the file exists at the following location: "C:\ProgramData\NetFree\CA\netfree-ca-bundle-curl.crt"

git config --global http.sslCAInfo /path/to/netfree-ca-bundle-curl.crt

If this doesn't work, you may need to use Command Prompt/Powershell and not bash, or try to change the slashes in the file path from "\" (the way Windows displays them) to "/" (the way Linux displays them and bash expects them)


The Windows system also needs to run:

git config --global http.sslbackend openssl

If you want to cancel the operation, run:

git config --global --unset http.sslCAInfo 

⚠ If you use a git graphical client, sometimes the git command is not installed globally. To run the above commands you need to find the path to the git.exe file and write the entire path (inside quotation marks) instead of the word git</code.

To embed existing certificates on your computer using git software, you can download the following file: WinCertsToPem.zip and run it.


Credit to http://stackoverflow.com/a/16543283




Another option, cancel the SLL, which eliminates the need for a security certificate (less recommended option).

To do this, run the following command:


 git config --global http.sslVerify "false"

If you want to cancel the operation, run:

 git config --global --unset http.sslVerify 

SourceTree

When working with SourceTree software (GIT Graphic Client, link), You can also specify in the settings not to use ssl - then there is no need to install the certificate,

The check will be done when entering the menu Tools > Options > Git Select Disable SSL certificate validation.


External links

Home page of Git

SourceTree site

  1. At the moment, the tool is not yet runninggit config --system http.sslbackend openssl