C# 使用授权的Mercurial.Net pullCommand
我正在尝试使用Mercurial.NET库从Mercurial中提取代码更改。我得到一个授权异常,没有得到任何结果,下面是代码C# 使用授权的Mercurial.Net pullCommand,c#,mercurial,C#,Mercurial,我正在尝试使用Mercurial.NET库从Mercurial中提取代码更改。我得到一个授权异常,没有得到任何结果,下面是代码 Repository repository = new Repository(@"D:\sandeep\work\20Dec2016"); PullCommand pullcommand = new PullCommand(); repository.Pull(pullcommand); 这是我的代码,有没有办法,我可以为身份验证指定我的凭据(用户名和密码),以便提
Repository repository = new Repository(@"D:\sandeep\work\20Dec2016");
PullCommand pullcommand = new PullCommand();
repository.Pull(pullcommand);
这是我的代码,有没有办法,我可以为身份验证指定我的凭据(用户名和密码),以便提取最近的更改?我可以通过以下代码和Lasse V.Karlsen的帮助获得结果
Repository repository = new Repository(@"D:\sandeep\Work\20Dec2016");
pullCommand.WithConfigurationOverride("auth", "x.prefix", "*");
pullCommand.WithConfigurationOverride("auth", "x.username", "ssk");
pullCommand.WithConfigurationOverride("auth", "x.password", "ssk");
repository.Pull(pullCommand);