I am trying to access the metadata for the following COG (Cloud Optimized GeoTIFF) using
gdalinfo /vsicurl/https://landsatlook.usgs.gov/data/collection02/level-2/standard/oli-tirs/2022/082/070/LC09_L2SR_082070_20220427_20220429_02_T1/LC09_L2SR_082070_20220427_20220429_02_T1_SR_B3.TIF
But this resulted in error
ERROR 4: `/vsicurl/https://landsatlook.usgs.gov/data/collection02/level-2/standard/oli-tirs/2022/082/070/LC09_L2SR_082070_20220427_20220429_02_T1/LC09_L2SR_082070_20220427_20220429_02_T1_SR_B3.TIF' not recognized as a supported file format.
gdalinfo failed - unable to open '/vsicurl/https://landsatlook.usgs.gov/data/collection02/level-2/standard/oli-tirs/2022/082/070/LC09_L2SR_082070_20220427_20220429_02_T1/LC09_L2SR_082070_20220427_20220429_02_T1_SR_B3.TIF'.
I tried importing in QGIS (with credentials) as well but it resulted in same error.
I am able to download the file when I paste the url in browser (it asks for credentials using server ers.cr.usgs.gov
and on successful login, it downloads the file)
The url is taken from stacindex.org
How to pass in the credentials so GDAL can authenticate?
Update: I tried passing config options as mentioned in mailing list here but it still results in the same error
gdalinfo /vsicurl/https://landsatlook.usgs.gov/data/collection02/level-2/standard/oli-tirs/2022/082/070/LC09_L2SR_082070_20220427_20220429_02_T1/LC09_L2SR_082070_20220427_20220429_02_T1_SR_B3.TIF --config GDAL_DISABLE_READDIR_ON_OPEN EMPTY_DIR --config CPL_CURL_VERBOSE ON --config CPL_VSIL_CURL_USE_HEAD FALSE --config GDAL_HTTP_COOKIEFILE /tmp/cookies.txt --config GDAL_HTTP_COOKIEJAR /tmp/cookies.txt --config CPL_VSIL_CURL_ALLOWED_EXTENSIONS TIF
GDAL 3.3.3