---
layout: default
menu_item: api
title: Clone
description: Version 0.26.1
menu_item: api
return_to:
"API Documentation Index": /api/
sections:
"clone": "#clone"
"LOCAL": "#LOCAL"
---
## Clone.clone Async
```js
Clone.clone(url, local_path, [options]).then(function(repository) {
// Use repository
});
```
Patch repository cloning to automatically coerce objects.
| Parameters | Type | |
| --- | --- | --- |
| url | String | url of the repository |
| local_path | String | local path to store repository |
| [options] | [CloneOptions](/api/clone_options/) | |
| Returns | |
| --- | --- |
| [Repository](/api/repository/) | repo |
## Clone.LOCAL ENUM
| Flag | Value |
| --- | --- | --- |
| Clone.LOCAL.AUTO | 0 |
| Clone.LOCAL.LOCAL | 1 |
| Clone.LOCAL.NO_LOCAL | 2 |
| Clone.LOCAL.NO_LINKS | 3 |