After updating git to 2.20.1, Tag Repository Changeset event handler fails

Yesterday I updated git on my server to the latest version 2.20.1. Since then, the “Tag Repository Changeset” event handlers started failing.

The error message looks like that:

An error occurred while adding the tag ‘LP-1.0.0.85’ to the changeset with revision ‘bf0a01e195c1806768b7691e1811b95b17bbb03a’ in repository ‘Web’. Message: Running ‘C:\Program Files\Git\cmd\git.exe’ with arguments “push --tags --prune --quiet https://github.com/Foo/Bar” failed with return code -2147483648 and error output: "fatal: could not read Username for ‘https://github.com’: Invalid argument
"

I have configured the Github repository using https.

Hi Kirill,

This error points to an issue authenticating with GitHub. Have you entered a Username and Password (or Push Username and Push Password) into Git repository settings?

There are currently two ways that the Git command line can authenticate with a Git repository via HTTPS. One is by passing the username and password with the URL. This is done by Continua CI when a Username and Password are included in the repository settings. No username and password (asterisks) are included in the URL in your error message.

If the username and password are not set, then the Git command line will either prompt or use a credentials manager. The credential manager will prompt for a username the first time you need one when running a Git command and then store it for subsequent commands on that repository. Of course, prompts don’t work for an application running as a background service, and we can’t reply to them.

If you run the command line git config --get-all credential.helper on the server. This will tell you which credentials manager is enabled. By default, recent versions of Git for Windows use the Git Credential Manager for Windows, named just “manager”.

You can ensure that the Git Credential Manager has a username and password stored for your GitHub repository by logging in to the server using the user account that the Continua CI Server service is logged in as. Run a Git command that requires authentication on the server and enter the username and password into the prompts.

We have recently started working on a custom credentials manager which should simplify logging into Git repositories in the future.

Alternatively, you can connect to the Git repository using SSH.

If you still have problems after following the above, let us know which version of Continua CI you are running.

Thank you for the answer.

I reinstalled the git client and made sure to enable the Credential Manager for Windows. It seems to be working again.

Cheers