diff --git a/NuKeeper.Git/GitCmdDriver.cs b/NuKeeper.Git/GitCmdDriver.cs index b1f37e147..fb9647094 100644 --- a/NuKeeper.Git/GitCmdDriver.cs +++ b/NuKeeper.Git/GitCmdDriver.cs @@ -95,12 +95,12 @@ private async Task StartGitProzess(string arguments, bool ensureSuccess private Uri CreateCredentialsUri(Uri pullEndpoint, GitUsernamePasswordCredentials gitCredentials) { - if (_gitCredentials == null) + if (_gitCredentials?.Username == null) { return pullEndpoint; } - return new UriBuilder(pullEndpoint) { UserName = gitCredentials.Username, Password = gitCredentials.Password }.Uri; + return new UriBuilder(pullEndpoint) { UserName = Uri.EscapeDataString(gitCredentials.Username), Password = gitCredentials.Password }.Uri; } } }