I am running gitlab-server in a docker container. Have created a very simple post-receive custom_hook as defined below which I am trying to directly run through command line on my git-server:
#!/bin/bash
crumb=$(curl -u “admin:123456” -s ‘http://jenkins:8080/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)’)
curl -u “admin:123456” -H “$crumb” -X POST http://jenkins:8080/job/hello-world/build?delay=0sec
The post-receive file has executable permissions and its group and user is already set as ‘git’, but still on execution it gives the following error:
<h1>Bad Message 400</h1<<pre<reason: Illegal character VCHAR=’<’</pre>
Is anything wrong with my bash script?