# git-remote-origin-url

> Get the remote origin URL of a Git repository

Latest version **4.0.0** (published 2021-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-remote-origin-url
pnpm add git-remote-origin-url
yarn add git-remote-origin-url
bun add git-remote-origin-url
```

## Health

**Score 28/100 (F)** — status: abandoned.

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-09-10 |
| First published | 2014-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/git-remote-origin-url) |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 1 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 47 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | git, config, url, repo, remote, origin |

## Links

- npm: https://www.npmjs.com/package/git-remote-origin-url
- Repository: https://github.com/sindresorhus/git-remote-origin-url
- Homepage: https://github.com/sindresorhus/git-remote-origin-url#readme
- Issues: https://github.com/sindresorhus/git-remote-origin-url/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/git-remote-origin-url

## Dependencies (1)

- [gitconfiglocal](https://npm.io/package/gitconfiglocal.md) ^2.1.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-09-10
- 3.1.0 — 2020-02-22
- 3.0.0 — 2019-04-06
- 2.0.0 — 2016-01-12
- 1.1.2 — 2015-08-22
- 1.1.1 — 2015-02-16
- 1.1.0 — 2014-12-05
- 1.0.0 — 2014-08-14
- 0.1.1 — 2014-02-25

## README

# git-remote-origin-url

> Get the remote origin URL of a Git repository

## Install

```
$ npm install git-remote-origin-url
```

## Usage

```js
import gitRemoteOriginUrl from 'git-remote-origin-url';

console.log(await gitRemoteOriginUrl());
//=> 'git@github.com:sindresorhus/git-remote-origin-url.git'
```

## gitRemoteOriginUrl(options?)

### options

Type: `object`

#### cwd

Type: `string`\
Default: `process.cwd()`

The current working directory.

#### remoteName

Type: `string`\
Default: `'origin'`

The Git remote name.

---

<div align="center">
	<b>
		<a href="https://tidelift.com/subscription/pkg/npm-git-remote-origin-url?utm_source=npm-git-remote-origin-url&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
	</b>
	<br>
	<sub>
		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
	</sub>
</div>

---
_Source: https://npm.io/package/git-remote-origin-url · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
