github-ssh-url

1.0.1 • Public • Published

npm

github-ssh-url

Build Status Dependency Status

Make GitHub SSH URL from HTTPS URL or username/repository.

Example

githubSshUrl('user', 'repo')
//=> 'git@github.com:user/repo.git'
 
githubSshUrl('user/repo')
//=> 'git@github.com:user/repo.git'
 
githubSshUrl('https://github.com/user/repo')
//=> 'git@github.com:user/repo.git'
 
githubSshUrl('git@github.com:user/repo.git#tag')
//=> 'git@github.com:user/repo.git'
 
githubSshUrl(sshUrl), sshUrl, 'SSH url');
//=> 'git@github.com:user/repo.git'

API

githubSshUrl(url)

githubSshUrl(user, repo)

Returns SSH URL.

CLI

github-ssh-url [URL]

With no URL, reads URL from the standard input.

Prints SSH URL.

Install

npm install github-ssh-url

License

MIT

/github-ssh-url/

    Package Sidebar

    Install

    npm i github-ssh-url

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • eush77