hubble
hubble copied to clipboard
The Git Requests Report need to specifically exclude 401 errors
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: Thanks for pointing this out. I’ll have a look at what we can do to fix this.