Get the remote origin URL of a Git repository
$ npm install git-remote-origin-url
import gitRemoteOriginUrl from 'git-remote-origin-url';
console.log(await gitRemoteOriginUrl());
//=> 'git@github.com:sindresorhus/git-remote-origin-url.git'
Type: object
Type: string
Default: process.cwd()
The current working directory.
Type: string
Default: 'origin'
The Git remote name.
Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.