Trouble Setting Up

Recently I’ve been trying to push a local repo into an empty Github repo I created and am running into an issue looking like the following:

User@PC MINGW64 /e/Programming/Repos/TestRepo (main)
$ git push -u origin main
fatal: unable to access 'https://github.com/Heroicos/GithubTest.git/': error setting certificate verify locations:  CAfile: C:/Program Files/Git/mingw64/bin/curl-ca-bundle.crt CApath: none

I believe it may have something to do with the certification authory, but would appreciate if any experienced users out there can help point me in the right direction!

1 Like

It’s possible you’re facing two distinct problems here.

  1. You should remove the trailing .git from your repository URL (i.e. in the remote).
  2. Something is wrong with your Git for Windows installation, either the mentioned file curl-ca-bundle.crt is not present, or the CApath environment variable is not set or pointing to the wrong location.

Try fixing point 1 and see how it goes.

Also, you might want to check your settings for the credentials manager, because GitHub has introduced some changes relating to OAuth lately, and I remember having to tweak some settings to prevent it from always asking the password at each push operation.

You can also set alternative credential managers, beside the one that ships with Git for Windows, e.g. the one from Microsoft.

I’m sorry I can’t give you more detailed info, I’m just writing out of the back of my head, having experienced similar problems a number of times too.

Good luck.

The default location using a recent git-scm version (git version 2.31.0.windows.1) install is
$ git config --list --show-origin
file::/Git/etc/gitconfig http.sslcainfo=:/Git/mingw64/ssl/certs/ca-bundle.crt
Unless you are communicating through a corporate proxy that is presenting its own self-signed (untrusted) certificate the default certificate bundle and location provicdd as part of git-scm install should be fine.

If that’s the full log of what you get from the git config --list --show-origin command, then there’s definitely something wrong with the installation. Wit the same command (on git version 2.32.0.windows.1) I get a much longer list of settings paths, but most of all I get some OS related absolute path after the various file: entries, whereas your log show truncated paths.

Are you installing Git on your own machine, or is a machine at the office, where admins have control over it and you have limited rights?

@tajmone, you have confused me with the problem owner Heroicos, I was just providing an example for him to display his config and a line/opton that was relevant to the crt bundle being used.