<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [git-documentdb](./git-documentdb.md) &gt; [cloneRepository](./git-documentdb.clonerepository.md)

## cloneRepository() function

Clone repository from remote

<b>Signature:</b>

```typescript
export declare function cloneRepository(workingDir: string, remoteOptions: RemoteOptions, logger?: Logger): Promise<nodegit.Repository | undefined>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  workingDir | string |  |
|  remoteOptions | [RemoteOptions](./git-documentdb.remoteoptions.md) |  |
|  logger | Logger |  |

<b>Returns:</b>

Promise&lt;nodegit.Repository \| undefined&gt;

## Exceptions

[CannotConnectError](./git-documentdb.cannotconnecterror.md)

