
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
gitlab-clone
Advanced tools
Powerful and flexible programmatic interface for the `git clone` command fork from gitclone
Powerful and flexible programmatic interface for the
git clone
command, using gitclone-defaults and cross-spawn
Install with npm
$ npm i gitclone --save
For more use-cases see the tests
const gitclone = require('gitclone')
Clones github repository, optionally pass destination folder. By defaults uses HTTPS to clone the repository. If you want SSH clone you should pass second, third or fourth argument boolean
true
, or object{ssh: true}
. Pattern can beuser/repo#branch
as first argument. Or first argumentuser
, second argumentrepo
, thirdbranch
, fourthssh
.
Hint: All arguments are super flexible and they are handled
absolutely directly with gitclone-defaults,
so read its API docs.
In addition, you also can pass callback
as last argument, otherwise
it will return Spawn stream.
Params
[callback]
{Function}: optional, if not given, returns a streamreturns
{Stream}: if not callback
given as last argument - a Spawn streamExample
const gitclone = require('gitclone')
// clones with SSH
gitclone('node-minibase/minibase', true)
// clone with HTTPS
gitclone('node-minibase/minibase', (err) => {
if (err) return console.error(err)
})
// clone `dev` branch from `verbose/verb` repo
gitclone('verbose/verb#dev', console.log)
// clone `jonschlinkert/nanomatch` with SSH
gitclone('jonchlinkert', 'nanomatch', true)
// clone to different destination folder
gitclone('hybridables/always-done', { dest: 'foobar' })
// clone SSH + dest + branch
gitclone('verbose/verb', { dest: 'verb0.9.0', branch: 'dev', ssh: true })
gitclone
- defaults, checks, validating, etc. | homepagePull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.
FAQs
Powerful and flexible programmatic interface for the `git clone` command fork from gitclone
We found that gitlab-clone 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
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.