-
Notifications
You must be signed in to change notification settings - Fork 888
git clone
jlee-tessik edited this page Jun 11, 2015
·
5 revisions
####Git
$ git clone https://github.com/libgit2/libgit2sharp.git
```
#### LibGit2Sharp
```csharp
Repository.Clone("https://github.com/libgit2/libgit2sharp.git", "path/to/repo");
```
To provide a username and password, pass in CloneOptions.
```csharp
var co = new CloneOptions();
co.CredentialsProvider = (_url, _user, _cred) => new UsernamePasswordCredentials { Username = "Username", Password = "Password" };
Repository.Clone("https://github.com/libgit2/libgit2sharp.git", "path/to/repo", co);
```