1.0.1 • Published 9 years ago

github-ssh-url v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

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