<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>You're right, I looked too fast. I've added a
GDAL_HTTP_NETRC_FILE option in
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/7435">https://github.com/OSGeo/gdal/pull/7435</a><br>
</p>
<div class="moz-cite-prefix">Le 12/03/2023 à 16:11, Morgan Kerle a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CACy+y1qRF9NiV6t8cBsi0ZJ2ztdi=7bZ-Cxm6OtcG56rnjO1Vg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>HI Even,</div>
<div><br>
</div>
<div>Thanks for your reply. I had assume that GDAL_HTTP_NETRC
set the option NETRC as in papszOptions which accepts "YES" or
"NO" to indicate if ~/.netrc file or $NETRC should be searched
for credentials. If this is the same option as CURLOPT_NETRC (<a
href="https://curl.se/libcurl/c/CURLOPT_NETRC.html"
moz-do-not-send="true" class="moz-txt-link-freetext">https://curl.se/libcurl/c/CURLOPT_NETRC.html</a>),
then it does not allow the user to specify a location for the
.netrc file. In any case, I attempted setting the
GDAL_HTTP_NETRC via gdal.SetConfigOption(), but I am still
getting the same curl output (Couldn't find host <a
href="http://data.lpdaac.earthdatacloud.nasa.gov"
moz-do-not-send="true">data.lpdaac.earthdatacloud.nasa.gov</a>
in the (nil) file; using defaults). <br>
</div>
<div><br>
</div>
<div>I assume (nil) file should be showing the file path
supplied via GDAL_HTTP_NETRC?</div>
<div><br>
</div>
<div>Morgan<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, 12 Mar 2023 at 10:58,
Even Rouault <<a href="mailto:even.rouault@spatialys.com"
moz-do-not-send="true" class="moz-txt-link-freetext">even.rouault@spatialys.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Morgan,</p>
<p>The right name is <span>GDAL_HTTP_NETRC</span> : <a
href="https://gdal.org/api/cpl.html#_CPPv412CPLHTTPFetchPKc12CSLConstList"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://gdal.org/api/cpl.html#_CPPv412CPLHTTPFetchPKc12CSLConstList</a></p>
<p>Even<br>
</p>
<p>GDAL_HTTP_NETRC<br>
</p>
<div>Le 12/03/2023 à 15:49, Morgan Kerle a écrit :<br>
</div>
<blockquote type="cite">I am trying to use the /vsicurl/
file hander to access a remote tiff file using basic auth.
Is it possible to provide a alternate location <br>
<br>
for a .netrc file via the Python bindings? I have
attempted to use SetConfigOption("CPL_CURL_NETRC_FILE"
"abs/file/path/to/.netrc"). <br>
<br>
This appears to correctly set the CURL_NETRC_FILE option,
as CURL debugging output shows "Couldn't find host <a
href="http://data.lpdaac.earthdatacloud.nasa.gov"
target="_blank" moz-do-not-send="true">data.lpdaac.earthdatacloud.nasa.gov</a>
in the (nil) file; using defaults". However, it appears
the file is not found / accessible by libcurl. <br>
<br>
Any suggestions as to why this may be the case? I have
already confirmed that the file exists and is accessible,
and running CURL with the same parameters in bash works
fine. <br>
<br>
Regards, <br>
<br>
Morgan <br>
<br>
_______________________________________________ <br>
gdal-dev mailing list <br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a>
<br>
<a
href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
<br>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>