<div dir="ltr"><div>Ok, thank you very much for your time and assistance Even.</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 11:35, Even Rouault <<a href="mailto:even.rouault@spatialys.com">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>You're right, I looked too fast. I've added a
GDAL_HTTP_NETRC_FILE option in
<a href="https://github.com/OSGeo/gdal/pull/7435" target="_blank">https://github.com/OSGeo/gdal/pull/7435</a><br>
</p>
<div>Le 12/03/2023 à 16:11, Morgan Kerle a
écrit :<br>
</div>
<blockquote type="cite">
<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" target="_blank">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" target="_blank">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" target="_blank">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">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">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">gdal-dev@lists.osgeo.org</a>
<br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
<br>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote>
</div>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote></div>