[JENKINS-72606] Make Git repos work via HTTP#112
[JENKINS-72606] Make Git repos work via HTTP#112daniel-beck wants to merge 1 commit intojenkinsci:masterfrom
Conversation
|
Be very careful here. This plugin is a bad idea generally, but my distant memory of it is that HTTP mode is essentially useless because it does not support authentication at all and so is only appropriate for an unsecured controller. You have to use SSH if you want authentication. It is possible this PR opens up all Git servers for anonymous pull over HTTP, which could be a serious vulnerability. I am not sure what protection exists for pushes. I do not follow the justification in Jira either. In the unlikely event that you were using this plugin, you should be using it via SSH; it does not make sense to disable the SSHD port in Jenkins as a workaround and then install the |
Jira comment relating to bug discovery than justification. The mode being broken meant we could not mention it as a workaround.
All implementations currently use |
Looks like all that was missing is an HTTP auth challenge, which Jenkins doesn't usually send. The following isn't particularly pretty (probably better off in this repo), but works for me: jenkinsci/git-userContent-plugin#5 |
https://issues.jenkins.io/browse/JENKINS-72606
Testing done
Installed https://plugins.jenkins.io/git-userContent/ and ran
GIT_TRACE=1 GIT_TRACE_PACKET=1 GIT_CURL_VERBOSE=1 git clone http://localhost/8080/userContent.gitWithout this fix, it fails with