Skip to content

eush77/github-ssh-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Make GitHub SSH URL from HTTPS URL or username/repository

Resources

License

Stars

Watchers

Forks

Packages

No packages published