I would like to run this Git command:
git submodule add https://github.com/example/example.git
But I get this error:
Cloning into 'C:/projects/xxx/yyy/zzz/'... fatal: unable to access 'https://github.com/xxx/yyy.git/': error setting certificate verify locations:
CAfile: C:\Program Files (x86)\git\bin\curl-ca-bundle.crt
CApath: none
fatal: clone of 'https://github.com/xxx/yyy.git' into submodule path 'C:/projects/xxx/yyy/zzz/example' failed
So, to fix this, I am trying to run this command:
git config --system http.sslcainfo "C:\Program Files (x86)\git\bin\curl-ca-bundle.crt"
But I get this error message:
error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: Permission denied
How can I fix this?
git config is a powerful command in Git. You can use the Git configuration file to customize how Git works. This file exists in the project level where Git is initialized ( /project/. git/config ) or at the root level ( ~/. gitconfig ).
The reason they can't find gitconfig is simply because it's nowhere to be found. When developers install Git, the various Git configuration files won't automatically create. Files like gitconfig and . gitconfig are only created when they're first used.
The global git config is simply a text file, so it can be edited with whatever text editor you choose. Open, edit global git config, save and close, and the changes will take effect the next time you issue a git command. It's that easy.
gitconfig located in the user's home folder (C:\Users\git user)
you need to be in admin mode to execute the command (in cmd terminal or in PowerShell (Admin) on windows10)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With