• Drew Blessing's avatar
    Allow CI to clone public projects when HTTP protocol is disabled · 7f00bcb9
    Drew Blessing authored
    GitLab has a mechanism that allows CI to clone repositories via HTTP
    even when the HTTP protocol is disabled. This works as expected
    when a project is private or internal. However, when a project is
    public CI gets an error message that HTTP is not allowed. This
    happens because Git only sends auth in a subsequent request after a
    401 is returned first. For public projects, GitLab grabs onto that
    unauthenticated request and sends it through since it recognizes
    that Guests are ordinarily allowed to access the repository.
    Later on this leads to a 403 since HTTP protocol is disabled.
    Fix this by only continuing with unauthenticated requests when
    HTTP is allowed.
    7f00bcb9
git_http_client_controller.rb 3.33 KB