Skip to content

Do not ask for authentication when cloning a public repository

username-removed-25943 requested to merge (removed):6-7-stable into 6-7-stable

This pull reuqest fixes issue #199 (closed) (anonymous HTTP[S] cloning does not work). I tracked the issue down to the following problem: When git clones via HTTP, ultimately, in the file <lib/gitlab/backend/grack_auth.rb>, the function authorized_request? is called. The problem is that git_cmd is nil in that situation for the initial request, therefore the request is rejected and the server asks for authentication. The attached commit changes authorized_request? to treat nil as a DOWNLOAD command, and thus allow it without password for un-authenticated users.

Merge request reports