The Wayback Machine - https://web.archive.org/web/20200918055611/https://github.com/github/libgit2sharp/wiki/git-pull
Skip to content

git pull

AppsWiz edited this page Apr 22, 2015 · 1 revision

git-pull

Pulls updates from a remote using Authentication

####Git

$ git pull
```
#### LibGit2Sharp
```csharp
using (var repo = new Repository("path/to/your/repo"))
{
    LibGit2Sharp.PullOptions options = new LibGit2Sharp.PullOptions();
    options.FetchOptions = new FetchOptions();
    options.FetchOptions.CredentialsProvider = new CredentialsHandler(
        (url, usernameFromUrl, types) =>
            new UsernamePasswordCredentials()
            {
                Username = USERNAME,
                Password = PASSWORD
            });
    repo.Network.Pull(new LibGit2Sharp.Signature(USERNAME, EMAIL, new DateTimeOffset(DateTime.Now)), options)
}
```
You can’t perform that action at this time.