From: Paul Smith <paul@mad-scientist.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Git mailing list <git@vger.kernel.org>
Subject: Re: RUNTIME_PREFIX references in gitconfig variable paths
Date: Wed, 04 Jul 2018 09:56:56 -0400 [thread overview]
Message-ID: <55733da67095123ced63095aa554970053bef321.camel@mad-scientist.net> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1807041323490.75@tvgsbejvaqbjf.bet>
On Wed, 2018-07-04 at 13:26 +0200, Johannes Schindelin wrote:
> On Wed, 4 Jul 2018, Paul Smith wrote:
>
> > One thing I wanted to do was provide a default ca-bundle.crt file
> > along with my local build of Git. I need my installation to be
> > relocatable and I'm using RUNTIME_PREFIX with Git 2.18.0 (on
> > GNU/Linux).
>
> Understandable. We do this all the time in Git for Windows. Our
> config entry has this form:
>
> [http]
> sslCAinfo = /ssl/certs/ca-bundle.crt
>
> and in the RUNTIME_PREFIX mode, this will be made relative to the
> runtime prefix. It is my understanding that bf9acba (http: treat
> config options sslCAPath and sslCAInfo as paths, 2015-11-23) makes
> this work.
Hm. Unless I'm missing something this doesn't happen (and indeed, it
does not work for me; with:
[http]
sslcainfo = /etc/ca-bundle.crt
I get:
fatal: unable to access 'https://github.com/myrepo.git/': error
setting certificate verify locations:
CAfile: /etc/ca-bundle.crt
CApath: none
although it works if I use a fully-qualified pathname, and using strace
I find the process never attempted to access any other path for ca-
bundle.crt).
In http.c we see how this path is treated in http_options():
if (!strcmp("http.sslcainfo", var))
return git_config_pathname(&ssl_cainfo, var, value);
I can't tell exactly how this function is invoked, but the result
(ssl_cainfo) is used here without further modification:
curl_easy_setopt(result, CURLOPT_CAINFO, ssl_cainfo);
In config.c we find get_config_pathname() which does this:
*dest = expand_user_path(value, 0);
In path.c we find expand_user_path() which does this:
if (path == NULL)
goto return_null;
if (path[0] == '~') {
...
}
strbuf_addstr(&user_path, to_copy);
return strbuf_detach(&user_path, NULL);
I don't see any reference to system_prefix(), system_path(), etc. which
would be needed to RUNTIME_PREFIX-ize things.
next prev parent reply other threads:[~2018-07-04 14:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 6:08 RUNTIME_PREFIX references in gitconfig variable paths Paul Smith
2018-07-04 11:26 ` Johannes Schindelin
2018-07-04 13:56 ` Paul Smith [this message]
2018-10-02 14:28 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55733da67095123ced63095aa554970053bef321.camel@mad-scientist.net \
--to=paul@mad-scientist.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).