Get the Code

Get the Code carson Fri, 02/22/2019 - 10:20

These instructions will allow users to download the current NEMSfv3gfs source code including CCPP capabilities.  The authoritative repositories are located on github.com, in the NCAR organizational space.  We will be using the NOAA RDHPCS system, theia, for these exercises!

If you are not familiar with git, please refer to the following pages:

https://help.github.com/ —

https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow

Start by going into a working directory in your project space, i.e.

cd ${YOUR_WORK_DIR}

Next, clone the top-level git repository and all of it's submodules, checking out the appropriate tag (emc_training_march_2019)

git clone --recursive -b emc_training_march_2019 https://github.com/NCAR/NEMSfv3gfs

Note. Potential errors while checking out the submodule NCEPLIBS-pyprodutil (e.g., "gerrit: Name or service not known") can be ignored.

You will now have a local working copy of the source code:

cd NEMSfv3gfs

GitHub Authentication

GitHub Authentication carson Wed, 03/13/2019 - 06:51

Using github via command line with two factor authentication.

Step 1: Make a token. Instructions are here under "Creating a token"

https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line

Step 2: You will get a long, hexadecimal, number. Store it somewhere. This is your token, and password. If you are storing it on a shared machine, like Theia, then make sure you:

chmod 400 /path/to/token.txt

Step 3: When using github:

git ... whatever command ...

Enter your github username: ... give it your github username ...

Password ...enter the token from Step 2.

If you are not using two-factor authentication and you are tired of typing your username/password: - from within a local github directory, type

git config --global credential.helper store 

Next time you checkout code, enter username and password and they will be stored automatically - see

https://git-scm.com/docs/git-credential-store