Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit d456e9d

Browse files
committed
Use accept-untrusted SVN endpoint parameter in VSO Agent
1 parent e374ff6 commit d456e9d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/agent/scm/lib/svnwrapper.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export interface ISvnConnectionEndpoint {
3333
username: string;
3434
password: string;
3535
realmName: string;
36+
acceptUntrusted: boolean;
3637
url: string;
3738
}
3839

@@ -310,17 +311,19 @@ export class SvnWrapper extends events.EventEmitter {
310311
// default connection related args
311312
var usernameArg = '--username';
312313
var passwordArg = '--password';
314+
var trustArg = "--trust-server-cert";
313315

314316
var defaults: string[] = [];
315317

316318
if (this.endpoint.username && this.endpoint.username.length > 0) {
317-
this.ctx.verbose("username=" + this.endpoint.username);
318319
defaults.push(usernameArg, this.endpoint.username);
319320
}
320321
if (this.endpoint.password && this.endpoint.password.length > 0) {
321-
this.ctx.verbose("password=" + this.endpoint.password);
322322
defaults.push(passwordArg, this.endpoint.password);
323323
}
324+
if (this.endpoint.acceptUntrusted) {
325+
defaults.push(trustArg);
326+
}
324327

325328
var quotedArg = function(arg) {
326329
var quote = '"';

src/agent/scm/svn.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export class SvnScmProvider extends scmprovider.ScmProvider {
6161
username: this.username,
6262
password: this.password,
6363
realmName: this.realmName,
64+
acceptUntrusted: this.endpoint.data &&
65+
this.endpoint.data["acceptUntrustedCerts"] &&
66+
(this.endpoint.data["acceptUntrustedCerts"].toLowerCase() === "true"),
6467
url: this.endpoint.url
6568
});
6669
}

0 commit comments

Comments
 (0)