The following software programs need to be installed.
-
Test
git --version
-
✏️ If not already set, set environment variables for GitHub organization/account and the name of the repository. Example:
export GIT_ACCOUNT=senzing export GIT_REPOSITORY=name-of-repository
-
Synthesize environment variables.
export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
🤔 Git repositories can be cloned via SSH or HTTPS.
For anonymous access, use HTTPS.
Perform one of the following commands to set GIT_REPOSITORY_URL
.
-
Use this example for anonymous access.
export GIT_REPOSITORY_URL="https://github.com/${GIT_ACCOUNT}/${GIT_REPOSITORY}.git"
-
Use this example to log in with GitHub credentials.
export GIT_REPOSITORY_URL="git@github.com:${GIT_ACCOUNT}/${GIT_REPOSITORY}.git"
-
🤔 Create parent directories. Choose one method.
-
Linux. Example:
mkdir --parents ${GIT_ACCOUNT_DIR}
-
macOS. Example:
mkdir -p ${GIT_ACCOUNT_DIR}
-
-
Get repository. Example:
cd ${GIT_ACCOUNT_DIR} git clone --recurse-submodules ${GIT_REPOSITORY_URL}