NUWCDIVNPT/stigman-watcher

Running STIGMan Watcher on Windows is not using Environment Variables

livesayjesse opened this issue · 3 comments

Hello,
I'm trying to deploy STIGMan watcher in our enviornment but it seems I am stuck with using only the command line options. When I try to run the stigman-watcher-win.exe I get the following: error: required option '--api ' not specified

 I have specified all of the required variables here:

image

 And also I edited the .env sample provided with the source code within the same directory. I had to name the file env.env since Windows does not allow me to rename a file with just an extension.
 I would personally love to just deploy this on Linux where the STIG Manager runs natively but we are not allowed SAMBA in our environment so the Linux servers cannot talk to the file share. 
 
 What I want to do is just setup the stigman-watcher-win.exe as a service to monitor the folders. I can run the command with all the cli options and get it to connect and successully pull in the .ckl. However, I have to use the --prompt command and provide the key each time since it is not actually looking for the variables. Im not sure if i am doing something wrong or if STIGMan Watcher just doesn't support environmental variables on Windows. Thanks!!

Hi @livesayjesse
Well, the fact that you can run with the command line arguments is a good sign....
Did you close your existing command line terminals and restart after you added the environment variables? They are usually set when the window opens, and don't refresh when you add new ones....That's bitten me more than a few times.
Do you see them when you echo/print them from the terminal?

I am also able to create a ".env" file on Windows without an issue... Maybe try that again? Maybe it won't create one if you have extensions hidden, or something?

Yes... So the environmental variables had reset but I also figured out how to rename the .env file. At elast for us you have to rename the file ".env." Windows will then accept the name but drop the last . lol I've never had to do that in Windows so that was new. Now it seems to be reading the .env file just fine. I love easy fixes! Thanks again!

Great!!