Re: [netcdfgroup] nccopy and redirect - based authorization

Dear Ashwin,

I have tested and it's working depending on the netcdf library version you are using.

With the version 4.1.3 (Ubuntu 14.04 repository package) the only way it'sembedding the credentials in the URI:

$ ncdump -h "https://YourUsernameUriEncoded:YourPassword@xxxxxxxxxxxx/thredds/dodsC/files/g/ds083.2/grib1/2000/2000.02/fnl_20000201_06_00.grib1";


For netcdf library version 4.3.3.1, compiled from source, the embedded credentials on URI it's working.

If you create a .dodsrc on your working directory or $HOME with your credentials

$ cat .dodsrc

HTTP.CREDENTIALS.USERPASSWORD=YourUsername:YourPassword

$ ncdump -h "https://rda.ucar.edu/thredds/dodsC/files/g/ds083.2/grib1/2000/2000.02/fnl_20000201_06_00.grib1";

and refering the .netrc file from your .dodsrc, both can be at your working or $HOME directory

$ cat .netrc

machine rda.ucar.edu login YourUsernamepassword YourPassword

$ cat .dodsrc

HTTP.NETRC=.netrc

$ ncdump -h "https://rda.ucar.edu/thredds/dodsC/files/g/ds083.2/grib1/2000/2000.02/fnl_20000201_06_00.grib1";

I hope this helps.

Antonio

P.S.: The instructions on the UCAR blog about configuring authentication are worthless with respect to the cookie parameteres. This is because UCAR authentication service it's not using them.


On 22/08/17 19:41, ashwin .D wrote:
>Dear Ashwin,

>Attached you can find a working example for the ESGF opendap endpoints.

>You can put it on your working directory (the HOME also it's valid)

>If the opendap endpoint it's not using SSL security you can ignore the HTTP.SSL.* entries.
>If you are having troubles you can enable the HTTP.VERBOSE

>Regards

>Antonio
Dear Antonio,
              Many thanks for giving me your .dodsrc file. I added a couple of 
the lines from your .dodsrc file and tried it out and
and I still get the same error. Have you tried downloading from the UCAR site 
recently ?
Best regards,
Ashwin.


On Mon, Aug 21, 2017 at 8:12 AM, ashwin .D <winash12@xxxxxxxxx <mailto:winash12@xxxxxxxxx>> wrote:

    Hello,
             Has anybody been able to use nccopy with redirect-based
    authorization and download a netCDF file ? I am referring to this
    -
    http://ncarrda.blogspot.in/2017/07/accessing-rda-opendap-endpoints-with.html
    
<http://ncarrda.blogspot.in/2017/07/accessing-rda-opendap-endpoints-with.html>
    and I get a authorization failed error even though I have an
    appropriate .netrc file as well as dodsrc file. Using standard
    python and netCDF python I am able to read http request and
    response of metadata pages on RDA - it is only nccopy that is
    failing. Does anybody have a working example of nccopy with this
    redirect-based authorization ?

    Best,
    Ashwin.




_______________________________________________
NOTE: All exchanges posted to Unidata maintained email lists are
recorded in the Unidata inquiry tracking system and made publicly
available through the web.  Users who post to any of the lists we
maintain are reminded to remove any personal information that they
do not want to be made public.


netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/

  • 2017 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: