[gdal-dev] GDAL - Python Bindings - CURL NETRC_FILE

Even Rouault even.rouault at spatialys.com
Sun Mar 12 07:58:21 PDT 2023


Morgan,

The right name is GDAL_HTTP_NETRC : 
https://gdal.org/api/cpl.html#_CPPv412CPLHTTPFetchPKc12CSLConstList

Even

GDAL_HTTP_NETRC

Le 12/03/2023 à 15:49, Morgan Kerle a écrit :
> 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
>
> for a .netrc file via the Python bindings? I have attempted to use 
> SetConfigOption("CPL_CURL_NETRC_FILE" "abs/file/path/to/.netrc").
>
> This appears to correctly set the CURL_NETRC_FILE option, as CURL 
> debugging output shows "Couldn't find host 
> data.lpdaac.earthdatacloud.nasa.gov in the (nil) file; using 
> defaults". However, it appears the file is not found / accessible by 
> libcurl.
>
> 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.
>
> Regards,
>
> Morgan
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230312/963fed29/attachment.htm>


More information about the gdal-dev mailing list