This was also tried on many other servers running Debian and CentOS, and Amazon AWS free server. The error "No valid crumb was included in the request" gets displayed when trying to configure a new job and specifically when inserting a link of the GIT repository. Sometimes this message gets displayed inside the configuration body of GIT. And sometimes the page goes white and the error displays this. Sometimes it passes the step where you configure your job and when you click Save at the bottom, then it displays the error. Sometimes while installing the basic Jenkins installation with basic packages the error gets displayed. Git repository is a custom GitLab repository. The only time it worked when I installed Jenkins on my Linux laptop and then configured a job and while accessing Jenkins, I had to enter localhost:8080 in my browser to access it locally. When I tried connecting to the Jenkins remotely, through its IP and port, it didn't work. I tried to connect to the server via VirtualNetworkComputing (VNC) like through a remote desktop and also didn't work. I also thought that the SSL needs to be configured on the server's domain to securely access Jenkins, but that didn't work either. The error still gets displayed. I also tried versions 2.60 and 2.7.
I had such a nice theory but not confirmed
Do you have a reverse proxy in front of Jenkins? If so, did you check the 'reverse proxy compatibility' option in the global security configuration?
Do you have init.groovy / init.groovy.d scripts configuring Jenkins on startup?
The reverse proxy compatibility fixed it!
I have not done the init.groovy script, are these necessary for Jenkins to work correctly as well?
are these necessary for Jenkins to work correctly as well
No, it's just a way to define configuration on startup, often similar to system properties, that would not show up in /systemInfo.