Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitlab-clone

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlab-clone

Powerful and flexible programmatic interface for the `git clone` command fork from gitclone

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gitclone npmjs.com The MIT License npm downloads

Powerful and flexible programmatic interface for the git clone command, using gitclone-defaults and cross-spawn

code climate standard code style travis build status coverage status dependency status

Install

Install with npm

$ npm i gitclone --save

Usage

For more use-cases see the tests

const gitclone = require('gitclone')

API

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 be user/repo#branch as first argument. Or first argument user, second argument repo, third branch, fourth ssh.

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 stream
  • returns {Stream}: if not callback given as last argument - a Spawn stream

Example

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 })

Contributing

Pull 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.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckoCore.tk keybase tunnckoCore tunnckoCore npm tunnckoCore twitter tunnckoCore github

Keywords

FAQs

Package last updated on 17 Sep 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc