1.0.1 • Published 9 years ago
github-ssh-url v1.0.1
github-ssh-url
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
1.0.1
9 years ago