Socket
Socket
Sign inDemoInstall

gitlogin

Package Overview
Dependencies
59
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gitlogin

Modern, simplified Github login, CLI and API - generating personal access token. Support promises and node-style callbacks.


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
4.91 MB
Created
Weekly downloads
 

Readme

Source

npm versi mit license build status coverage status deps status

Modern, simplified Github login, CLI and API - generating personal access token. Support promises and node-style callbacks.

Install

npm install gitlogin
npm test
gitlogin --help

Usage

For more use-cases see the tests. You can run node example.js to try it.

var gitlogin = require('gitlogin');

var opts = {
  //auth: 'username:password'
  username: 'your github username',
  password: 'your github pass',
  scopes: ['repo', 'gist'],
  note: 'My awesome cli login'
};

// callback-style
gitlogin(opts, function cb(err, res) {
  console.log('FROM CB:', err, res);
})

// or promise-style
gitlogin(opts)
.then(console.log)
.catch(console.error)

// or hybrid
gitlogin(opts, function cb(err, res) {
  console.log('FROM CB:', err, res);
})
.then(console.log)
.catch(console.error)

API

CLI

$ gitlogin --help

  Modern, simplified Github login, CLI and API - generating personal access token. Support promises and node-style callbacks.

  Options
    --help                   Show this help
    --version                Current version of package
    -u | --username          Your Github username, required
    -p | --password          Your Github password, required
    -s | --scopes            Scopes for github, not required
    -n | --note              Note for the app, not required
    -t | --token-only        If you want to show only token
    -j | --json         Output full JSON.stringified response

  Usage
    gitlogin <username> <password> [scopes] [note]
    gitlogin -p <password> -n [note] -u <username> -s [scopes]

  Examples
    gitlogin tunnckoCore myPassword 'repo, gist, delete_repo' 'some note for app'
    gitlogin tunnckoCore myPassword repo,gist,delete_repo 'some note for app'
    gitlogin tunnckoCore myPassword '' '' true false
    gitlogin --username tunnckoCore --password myPassword
    gitlogin --scopes repo,gist,delete_repo -u tunnckoCore -n myAwesomeApp -p myPassword
    gitlogin -u tunnckoCore -p myPassword

Author

Charlike Mike Reagent

License MIT license

Copyright (c) 2014 Charlike Mike Reagent, contributors.
Released under the MIT license.


Powered and automated by readdirp + hogan.js, December 24, 2014

FAQs

Last updated on 23 Dec 2014

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc