Jenkins shows error while installing Git and GitLab plugins

Trying to solve the Jenkins Plugins on Jenkins section. But while installing the plugins Git and GitLab, it shows following error:


This screenshot is for Git plugin. Same type of error occurred for GitLab plugin.

At the top of the screen shot it says Jenkins needs to be restarted. Try restarting Jenkins and trying again.