I do a lot of shell scripts called from Jenkins. Most of the time, I am logged in as a specific user. In one case, I was logged in as me, to do a sudo command. I got this error in the response:
Error opening terminal: unknown.
To fix it, I found a site online:
The fix for me was to edit my user’s .bashrc file and add:
After that Jenkins ran the script fine.