Skip to content

Commit

Permalink
Merge pull request #9 from des-science/bugz
Browse files Browse the repository at this point in the history
RMV remove password as it is not needed anymore
  • Loading branch information
beckermr authored Aug 18, 2023
2 parents 4a02d9c + 00d01eb commit 14298d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,10 @@ In order to download files from thr archive, you need a CILogon certificate. Fol
2. Login with your FNAL services account.
3. Click the ***Create Password-Protected Certificate*** link.
4. Follow the instructions to download a certificate.
5. Reformat the certificate by executing `des-archive-access-process-cert /path/to/cert`. This command will ask you for your password. (Hopefully we don't have to do this in the future.)
5. Reformat the certificate by executing `des-archive-access-process-cert /path/to/cert`. This command will ask you for the password you entered when making the certificate. (Hopefully we don't have to do this in the future.)

The certificate will be stored in the `~/.des_archive_access/` directory in your home area. **Make the sure the permissions on this directory are `700` via `chmod 700 ~/.des_archive_access/`.** You can change this location by setting the environment variable `DES_ARCHIVE_ACCESS_DIR`.

You need to export the certificate password via the DES_ARCHIVE_ACCESS_PASSWORD (which you can add to your `~/.bashrc` or similar):

```bash
export DES_ARCHIVE_ACCESS_PASSWORD=yourpassword
```

## Usage

### Downloading the Archive Metadata
Expand Down
4 changes: 1 addition & 3 deletions des_archive_access/dbfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ def download_file(fname, prefix=None, desdata=None, force=False, debug=False):
else:
debug_str = ""

cmd = (
"curl {} -k -L --cert {}:${{DES_ARCHIVE_ACCESS_PASSWORD}} -o {} -C - {}/{}"
).format(
cmd = ("curl {} -k -L --cert {} -o {} -C - {}/{}").format(
debug_str,
os.path.join(get_des_archive_access_dir(), "cert.pem"),
fpth,
Expand Down

0 comments on commit 14298d7

Please sign in to comment.