I set the environment variable "NODE_TLS_REJECT_UNAUTHORIZED=0" in my linux environment because I need to set this variable in a Selfhosted agent. When the agent is created and the installation is done (sudo ./svc.sh install username), the variable appears in the list of System capabilities but when starting the agent as a service (which is my need because it needs to run constantly) with the command sudo ./svc.sh start username, the agent is started but the variable disappears from System Capabilites.
I ask for help to solve this problem and understand where I am going wrong in the settings. Agent Version Used: 2.220.5
I tried to do the following:
I Solved my problem adding the variable 'NODE_TLS_REJECT_UNAUTHORIZED' in the file env.sh in the field "varCheckList=".
Like this:
varCheckList=( 'LANG' 'JAVA_HOME' 'ANT_HOME' 'M2_HOME' 'ANDROID_HOME' 'GRADLE_HOME' 'NVM_BIN' 'NVM_PATH' 'VSTS_HTTP_PROXY' 'VSTS_HTTP_PROXY_USERNAME' 'VSTS_HTTP_PROXY_PASSWORD' 'LD_LIBRARY_PATH' 'AGENT_TOOLSDIRECTORY' 'NODE_TLS_REJECT_UNAUTHORIZED' )