For a while now one specific user on my fedora 40 machine fails to clone any git repo at all with this error:
SSL certificate problem: unable to get local issuer certificate
Since the root user was not having this problem I created another regular user to test with. I created it with an empty home dir and that new user has no git problems whatsoever. Both users have empty gitconfig files and the system configuration file at /etc/gitconfig
is empty as well.
Now I imagine there is some file somewhere in my homedir that is causing this problem but short of just nuking the user and recreating it I'm not sure how to troubleshoot this. I've tried removing and reinstalling git but it made no difference.
Most of the search results seem to deal with this problem on Windows and the linux ones are not specific to this either.
Originally the /etc/gitconfig
file had this contents but even then it made no difference, the problem was exactly the same:
[http]
sslCAPath = /etc/ssl/certs/
git config --list
gives an empty result with both users. curl
works fine and I have no other SSL issues generally on either user so this seems like a very specific git problem I can't pinpoint.
Right now the only workaround is to disable SSL verification which is obviously not a workable longterm solution.
- GIT version 2.47.1 and
- kernel 6.12.7-100
git config --list --show-origin
and diff against the output from a working account. Try runningstrace -f git clone https://...
to see which files (e.g. CA bundles or config files) it is trying to access. Since Git uses libcurl, test withcurl https://
.git config --list --show-origin
comes up empty in both users. However stracing does bring up something interesting. For some reason it's looking into myNextcloud/Certs
for certificates which only contains one unrelated cert. Removing that file changes the error toerror setting certificate file
. So for reasons unknown it's only looking into that location for SSL certificatesexport | grep -i ssl
might be helpful.strace -f -o /tmp/git.working.strace git clone …
. As the user where it doesn't work, runstrace -f -o /tmp/git.broken.strace git clone …
. As someone who can read both files in /tmp/, rungit diff --word-diff /tmp/git.{broken,working}.strace
and scroll until things start to diverge fundamentally.