hubble icon indicating copy to clipboard operation
hubble copied to clipboard

The Git Requests Report need to specifically exclude 401 errors

Open mzzmjd opened this issue 5 years ago • 1 comments

The Git usage reports do not exclude 401 errors for https requests. Therefore it can give a misleading number of git requests (doubled for https requests).

Git will never send a password over HTTP unless it receives a 401 status from the server explicitly asking for the password. What this means is that on the first attempt to connect to a remote repository over http(s) Git will send only the username but not the password. When Git Server intercepts this request and can't proceed because a username and password are required, it returns the HTTP status of 401 to Git. Git receives this response, and then re-sends the request using the username and password that were provided.

Example, would be https://github.com/Autodesk/hubble/blob/master/updater/scripts/git-requests.sh

mzzmjd avatar Mar 18 '19 15:03 mzzmjd

@mzzmjd: Thanks for pointing this out. I’ll have a look at what we can do to fix this.

pluehne avatar Mar 21 '19 16:03 pluehne