github-ssh-url
v1.0.1
Published
Make GitHub SSH URL from HTTPS URL or username/repository
Downloads
2
Maintainers
Readme
github-ssh-url
Make GitHub SSH URL from HTTPS URL or username/repository.
Example
githubSshUrl('user', 'repo')
//=> '[email protected]:user/repo.git'
githubSshUrl('user/repo')
//=> '[email protected]:user/repo.git'
githubSshUrl('https://github.com/user/repo')
//=> '[email protected]:user/repo.git'
githubSshUrl('[email protected]:user/repo.git#tag')
//=> '[email protected]:user/repo.git'
githubSshUrl(sshUrl), sshUrl, 'SSH url');
//=> '[email protected]: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