Skip to content

Commit

Permalink
Merge pull request #2 from 2i2c-org/netrc-earthdata
Browse files Browse the repository at this point in the history
Create netrc file for earthdata credentials
  • Loading branch information
jnywong authored Dec 5, 2024
2 parents bb27bac + 403fa55 commit 08d289e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env bash
set -eux

# Override to open jupytext md files as notebooks
mkdir -p ${NB_PYTHON_PREFIX}/share/jupyter/lab/settings
cp binder/overrides.json ${NB_PYTHON_PREFIX}/share/jupyter/lab/settings
cp binder/overrides.json ${NB_PYTHON_PREFIX}/share/jupyter/lab/settings

# .netrc for earthdata credentials
touch ${HOME}/.netrc | chmod og-rw ${HOME}/.netrc | echo machine urs.earthdata.nasa.gov >> ${HOME}/.netrc
echo login ${EARTHDATA_USERNAME} >> ~/.netrc | echo password ${EARTHDATA_PASSWORD} >> ${HOME}/.netrc

0 comments on commit 08d289e

Please sign in to comment.