Closes#9274
This change addresses a bug where repository and repository environment variables are not being retrieved from the appropriate host, causing GHES users to fail without specifying `GH_HOST` to force `gh variable set` to do the right thing.
In addition, the tests for this command have been updated to check both github.com and GHES variations to ensure this works.