Skip to content

Commit 26bcceb

Browse files
committed
git fetch requires credentials.
1 parent 0033ef9 commit 26bcceb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/PostSharp.Engineering.BuildTools/Utilities/GitHelper.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,17 @@ private static bool TryAddOrigin( ConsoleHelper console, string repoDirectory, s
3131
return true;
3232
}
3333

34-
public static bool TryFetch( BuildContext context, string? branch ) => TryFetch( context.Console, context.RepoDirectory, branch );
34+
public static bool TryFetch( BuildContext context, string? branch )
35+
{
36+
if ( !TryConfigureCredentials( context ) )
37+
{
38+
return false;
39+
}
40+
41+
return TryFetch( context.Console, context.RepoDirectory, branch );
42+
}
3543

36-
public static bool TryFetch( ConsoleHelper console, string repoDirectory, string? branch )
44+
private static bool TryFetch( ConsoleHelper console, string repoDirectory, string? branch )
3745
{
3846
if ( branch != null && !TryAddOrigin( console, repoDirectory, branch ) )
3947
{

0 commit comments

Comments
 (0)