You are not logged in.

#1 2018-03-13 22:15:06

tassio
Member
Registered: 2015-04-12
Posts: 13

[SOLVED] Troubleshooting git(hub): error setting certificate verify lo

When I try to pull to one of my github repositories I get

$ git push origin master
fatal: unable to access 'https://github.com/me/my-repo/': error setting certificate verify locations:
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none

I am trying to understand what is going on, but I
haven't even managed to understand what CAfile and CApath are.

Any help is greatly appreciated.

Last edited by tassio (2018-03-15 10:49:12)

Offline

#2 2018-03-14 10:42:26

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: [SOLVED] Troubleshooting git(hub): error setting certificate verify lo

$ pacman -Qo /etc/ssl/certs/ca-certificates.crt 
/etc/ssl/certs/ca-certificates.crt is owned by ca-certificates-utils 20170307-1

And is your Github account configured to use ssh ?

Last edited by berbae (2018-03-14 10:43:25)

Offline

#3 2018-03-15 09:49:12

tassio
Member
Registered: 2015-04-12
Posts: 13

Re: [SOLVED] Troubleshooting git(hub): error setting certificate verify lo

Here's the output. Am I missing a file?

$ pacman -Qo /etc/ssl/certs/ca-certificates.crt
error: failed to read file '/etc/ssl/certs/ca-certificates.crt': No such file or directory

I am not sure what you mean about configuring Github.
I have my public keys there.

Last edited by tassio (2018-03-15 09:50:03)

Offline

#4 2018-03-15 10:03:41

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: [SOLVED] Troubleshooting git(hub): error setting certificate verify lo

So the 'pacman -Qo' output tells you the package 'ca-certificates-utils' is not correctly installed.

$ pacsearch ca-certificates
core/ca-certificates 20170307-1 [installed]
    Common CA certificates (default providers)
core/ca-certificates-cacert 20140824-4 [installed]
    CAcert.org root certificates
core/ca-certificates-mozilla 3.36-1 [installed]
    Mozilla's set of trusted CA certificates
core/ca-certificates-utils 20170307-1 [installed]
    Common CA certificates (utilities)

Have you got all these packages installed?

Give the output of:

ssh -T git@github.com

It tests the ssh connection to github.

Offline

#5 2018-03-15 10:48:18

tassio
Member
Registered: 2015-04-12
Posts: 13

Re: [SOLVED] Troubleshooting git(hub): error setting certificate verify lo

Aha!

Here's the output.

$ pacsearch ca-certificates
core/ca-certificates 20170307-1 [installed]
    Common CA certificates (default providers)
core/ca-certificates-cacert 20140824-4 [installed]
    CAcert.org root certificates
core/ca-certificates-mozilla 3.36-1 [installed]
    Mozilla's set of trusted CA certificates
core/ca-certificates-utils 20170307-1 [installed]
    Common CA certificates (utilities)
$ ssh -T git@github.com
Enter passphrase for key '/home/me/.ssh/github_ssh_key':
Hi me! You've successfully authenticated, but GitHub does not provide shell access.

All seems well, so I have tried reinstalling:

$ sudo pacman -S ca-certificates
warning: ca-certificates-20170307-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) ca-certificates-20170307-1

Total Installed Size:  0.00 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                                                                             [##########################################################################] 100%
(1/1) checking package integrity                                                                                           [##########################################################################] 100%
(1/1) loading package files                                                                                                [##########################################################################] 100%
(1/1) checking for file conflicts                                                                                          [##########################################################################] 100%
(1/1) checking available disk space                                                                                        [##########################################################################] 100%
:: Processing package changes...
(1/1) reinstalling ca-certificates                                                                                         [##########################################################################] 100%
$ sudo pacman -S ca-certificates-cacert ca-certificates-mozilla ca-certificates-utils
warning: ca-certificates-cacert-20140824-4 is up to date -- reinstalling
warning: ca-certificates-mozilla-3.36-1 is up to date -- reinstalling
warning: ca-certificates-utils-20170307-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (3) ca-certificates-cacert-20140824-4  ca-certificates-mozilla-3.36-1  ca-certificates-utils-20170307-1

Total Installed Size:  0.93 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n]
(3/3) checking keys in keyring                                                                                             [##########################################################################] 100%
(3/3) checking package integrity                                                                                           [##########################################################################] 100%
(3/3) loading package files                                                                                                [##########################################################################] 100%
(3/3) checking for file conflicts                                                                                          [##########################################################################] 100%
(3/3) checking available disk space                                                                                        [##########################################################################] 100%
warning: could not get file information for etc/ssl/certs/ca-certificates.crt
:: Processing package changes...
(1/3) reinstalling ca-certificates-utils                                                                                   [##########################################################################] 100%
(2/3) reinstalling ca-certificates-cacert                                                                                  [##########################################################################] 100%
(3/3) reinstalling ca-certificates-mozilla                                                                                 [##########################################################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Rebuilding certificate stores...

And now pushing:

$ git push origin master
Username for 'https://github.com': me
Password for 'https://me@github.com':
Counting objects: 3, done.
Writing objects: 100% (3/3), 228 bytes | 228.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/me/my-repo
 * [new branch]      master -> master

Funnily, it did not use ssh for that.

But this is another quest.

Thank you, berbae!

Offline

#6 2018-03-15 11:22:48

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Troubleshooting git(hub): error setting certificate verify lo

The reason it did not use ssh is because you did not `git clone` an ssh url, so your "origin" url is an https://...

Not sure why fixing that has to be a quest. tongue


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB