Skip to content

Fix verifying LFS uploads with GitHub

Nick Thomas requested to merge 254281-add-user-agent-to-git-lfs-client into master

What does this MR do?

Just for the verify action, GitHub (but not GitLab) requires a User-Agent header. Without one, you get this message:

Request forbidden by administrative rules. Please make sure your request has a User-Agent header (http://developer.github.com/v3/#user-agent-required). Check https://developer.github.com for other possible causes.

Adding the user-agent to all the requests does no harm. I'd honestly asssumed Gitlab::HTTP already did something like this.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Part of #254281 (closed)

Edited by Nick Thomas

Merge request reports