[gdal-dev] gdalinfo and WMS: is there a way to pass credentials via CLI?

andy aborruso at gmail.com
Fri Feb 23 09:42:41 PST 2024


Thank you, it works great

On Fri, 23 Feb 2024 at 18:27, Even Rouault <even.rouault at spatialys.com>
wrote:

> Hi,
>
> I haven't tested but you should be able to use any of the env variable
> listed for CPLHTTPFetch() at
> https://gdal.org/api/cpl.html#_CPPv412CPLHTTPFetchPKc12CSLConstList
>
> so here GDAL_HTTP_USERPWD
>
> gdalinfo "WMS:http://wms.geobase.ca/wms-bin/cubeserv.cgi" --config
> GDAL_HTTP_USERPWD user:password
>
> And probably that just incorporating it in the URL should work:
>
> gdalinfo "WMS:http://user:password@wms.geobase.ca/wms-bin/cubeserv.cgi"
>
> Even
> Le 23/02/2024 à 18:05, andy via gdal-dev a écrit :
>
> Hi,
> is there a way to pass UserPwd parameter via a gdalinfo command?
> Is there a way to pass it, without creating an XML file?
>
> Something like this
>
> gdalinfo "WMS:http://wms.geobase.ca/wms-bin/cubeserv.cgi"
> -UserPwd user:password
>
> Thank you
>
> --
> ___________________
>
> Andrea Borruso
> website: https://medium.com/tantotanto
> 38° 7' 48" N, 13° 21' 9" E, EPSG:4326
> ___________________
>
> "cercare e saper riconoscere chi e cosa,
>  in mezzo all’inferno, non è inferno,
> e farlo durare, e dargli spazio"
>
> Italo Calvino
>
> _______________________________________________
> gdal-dev mailing listgdal-dev at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>

-- 
___________________

Andrea Borruso
website: https://medium.com/tantotanto
38° 7' 48" N, 13° 21' 9" E, EPSG:4326
___________________

"cercare e saper riconoscere chi e cosa,
 in mezzo all’inferno, non è inferno,
e farlo durare, e dargli spazio"

Italo Calvino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240223/2dac9945/attachment-0001.htm>


More information about the gdal-dev mailing list