Skip to content

Commit

Permalink
CloneVerb: Let SSH URLs default to Git clones
Browse files Browse the repository at this point in the history
Signed-off-by: Derrick Stolee <[email protected]>
  • Loading branch information
derrickstolee committed Feb 24, 2020
1 parent 3b7a01f commit 3f524e7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Scalar/CommandLine/CloneVerb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,14 @@ private Result DoClone(string fullEnlistmentRootPathParameter, string normalized
this.Output.WriteLine(" Destination: " + this.enlistment.EnlistmentRoot);
this.Output.WriteLine(" FullClone: " + this.FullClone);

string authErrorMessage;
GitAuthentication.Result authResult = this.TryAuthenticate(this.tracer, this.enlistment, out authErrorMessage);
string authErrorMessage = null;
GitAuthentication.Result authResult = GitAuthentication.Result.UnableToDetermine;

// Do not try authentication on SSH URLs.
if (this.enlistment.RepoUrl.StartsWith("https://"))
{
authResult = this.TryAuthenticate(this.tracer, this.enlistment, out authErrorMessage);
}

if (authResult == GitAuthentication.Result.UnableToDetermine)
{
Expand Down

0 comments on commit 3f524e7

Please sign in to comment.