# !git.url

The `!git.url` Atmos YAML function returns the `origin` remote URL of the current Git
repository — for example, `https://github.com/cloudposse/atmos.git`. It works for GitHub,
GitLab, Bitbucket, and Azure DevOps.

## Usage

```yaml
  # Get the repository remote URL.
  # If the repository cannot be resolved, it returns a default value if specified; otherwise, it returns an error.
  !git.url <default-value>
```

## Examples

```yaml
vars:
  git_url: !git.url

  # With a fallback value when there is no remote.
  git_url_safe: !git.url https://github.com/my-org/my-repo.git
```

## Related Functions

- [`!git.repository`](/functions/yaml/git.repository) — the full `<owner>/<name>` slug
- [`!git.owner`](/functions/yaml/git.owner) — the repository owner / organization
- [`!git.name`](/functions/yaml/git.name) — the bare repository name
- [`!git.host`](/functions/yaml/git.host) — the repository host (e.g. `github.com`)
- [`!git.sha`](/functions/yaml/git.sha) — the current commit SHA
