This project allows you to download any folder inside a repo on github.
You need to have installed latest node, git, npm
Execute this:
# Clone this repo:
git clone -b main --depth 1 https://github.com/nikelborm/download-github-folder.git
# cd to it:
cd download-github-folder
# Install dependencies:
npm install
# Create .env file:
cp .template.env .env
Then get personal github access token here
GITHUB_ACCESS_TOKEN
: This is your personal access token from GitHub. It is used to authenticate your requests to the GitHub API. You can generate one from your GitHub account settings.GITHUB_REPO_OWNER
: This is the username of the owner of the repository you are trying to download from. For example, if the repository's URL ishttps://github.com/apache/superset
, the owner isapache
.GITHUB_REPO_NAME
: This is the name of the repository you are trying to download from. In the example above, the repository name issuperset
.PATH_TO_DIRECTORY_IN_REPO
: This is the path to the directory you want to download. It can be directory that lies inside root of repo likedocker
or it can be some nested directory likedocker/nginx
.COMMIT_SHA_HASH_OR_BRANCH_NAME_OR_TAG_NAME
: This is the commit SHA hash, branch name, or tag name you want to download from. If you don't specify it, the default branch in the repository will be used.
- Set env variables in
.env
file - Run
npm start