Search code examples
gitjenkinswebhooksscmmanagerbuild-triggers

How do I trigger a build in Jenkins, with Git push to SCM-manager, when Jenkins does not allow anonymous user?


Our buildserver at work is a Windows server 2012 r2. We have Jenkins installed as a Windows service on localhost:8081. We have Scm-Manager installed as a service on localhost:8082. (https://www.scm-manager.org/) We use Git as our version control.

Now we do not want anonymous user to have overall read (due to confidential stuff).

Before we removed the anonymous access we had configured the Jenkins project to trigger build remotely with a token "build". In SCM-Manager we used the Jenkins plugin to send the token "build" and only the master branch.

This doesn't work anymore.

I am looking at the plugin called Webhooks in Scm-manager. To do a http POST. Is this the solution? If so, how? I am doing something wrong. Other solutions?


Solution

  • I made it work, but not as suggested. I configured my local git repositories in scm-manager with: Jenkins-URL: e.g http://localhost:8082/, Jenkins-project name: e.g. "testProj", token e.g. "build", a Jenkins user name and the Jenkins user API-token. In my Jenkins project config: Project name: "testProj", Checked: Trigger build remotely, with token "build", and needed credential, a user name with password, with a user i scm-manager that had All repository read permission.