
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
download-git-repo
Advanced tools
Download and extract a git repository (GitHub, GitLab, Bitbucket) from node.
Download and extract a git repository (GitHub, GitLab, Bitbucket) from node.
$ npm install download-git-repo
Download a git repository
to a destination
folder with options
, and callback
.
The short hand repository string to download the repository from:
github:owner/name
or simply owner/name
gitlab:owner/name
bitbucket:owner/name
The repository
parameter defaults to the master
branch, but you can specify a branch or tag as a URL fragment like owner/name#my-branch
.
In addition to specifying the type of where to download, you can also specify a custom host like gitlab:custom.com:owner/name
.
Feel free to submit an issue or pull request for additional host options.
The file path to download the repository to.
An optional options object parameter with download options. Options include:
clone
- boolean default false
- If true use git clone
instead of an http download. While this can be a bit slower, it does allow private repositories to be used if the appropriate SSH keys are setup.The callback function as function(err)
.
Using http download from Github repository at master.
download('flipxfx/download-git-repo-fixture', 'test/tmp', function(err) {
if (err) return done(err);
done();
});
Using git clone from Bitbucket repository at my-branch.
download('bitbucket:flipxfx/download-git-repo-fixture#my-branch', 'test/tmp', { clone: true }, function(err) {
if (err) return done(err);
done();
});
To ianstormtaylor/download-github-repo for the head start.
MIT
FAQs
Download and extract a git repository (GitHub, GitLab, Bitbucket) from node.
The npm package download-git-repo receives a total of 85,387 weekly downloads. As such, download-git-repo popularity was classified as popular.
We found that download-git-repo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.