git -c diff.mnemonicprefix=false -c core.quotepath=false –no-optional-locks

Using SourceTree to operate Git, it was used normally before, but suddenly an error was reported.

Whether it is a Pull or Push operation, an error occurs:

git -c diff.mnemonicprefix=false -c core.quotepath=false –no-optional-locks fetch origin
Many blogs on the Internet are pasted and copied, such as:

Tell you to upgrade Git and SourceTree version,
SSH client changed to openSSH,
There are even those that delete the library and pull it again.
However, these methods have basically been tested to no avail.

Positive solution operation:

Enter the directory of the current error warehouse and execute the GieBash command

git config http.sslVerify "false"

or solve

In “Tools/Options/Network”, uncheck “Add proxy server information to Git/Mercurial configuration files”.

why?
When you access the Git remote warehouse through HTTPS, if the server’s SSL certificate is not signed by a third-party organization (for example: CA…), then Git will report an error. The reason is because an unknown unauthenticated signed certificate means that there may be a lot of risk. The above command is a good solution for Git to handle trusted SSL certificates. It limits the setting of ignoring certificate errors to a specific warehouse, avoiding potential security risks caused by expanding the scope of application that should be set.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_USEnglish