# read_git_remote_url_via_subprocess

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/_git/read_git_remote_url_via_subprocess)

Fall back to `git config --get remote.origin.url`.

## Signature

```python
read_git_remote_url_via_subprocess(
    path: str | Path,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `path` | `str \| Path` | Yes | Directory or file path inside a repository. |

## Returns

`str`

The `origin` remote URL reported by git, or an empty string on failure.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/e14e0adcbe78565ed3650e7f24b2a775d5437d25/libs/code/deepagents_code/_git.py#L410)