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