Open surfermicha opened 5 years ago
Seems that it doesn't recognize the :user
variable so that it isn't filled which ends in calling the server with the windows username. But the main question still is important: Why isn't he recognizing the :user
variable
I have the same problem , did you solve it ? @surfermicha
No, the problem is not solved. I worked around with an unbuntu VM to deploy, which - of course - is very uncomfortable.
mina seems to search in the ENV first when using a config: Here
The problem related with :user
can be solved by set ENV before we run mina
set USER=username
mina setup
However this is just the first evil lying on the way of deploying from Windows.
The issue happens because of a feature in Mina with which you can override variables with environment variables, e.g. mina deploy user=smth
will override whatever is set for user
variable in deploy.rb
.
This is unfortunate on Windows because environment variables can be accessed case-insensitively and since USER
variable exists, it overrides Mina user
variable.
A workaround for now is to invoke a command with a desired variable value, e.g. mina setup user=username
. This will be fixed in 2.0.0 when we won't be using environment variables anymore (you can follow the development of that in issue https://github.com/mina-deploy/mina/issues/675).
When I run
mina setup
on my windows machine (yes I know a unix system would be better) mina tries to ssh my server via the windows username even if I set it in the deploy.rb via theset :user, 'username'
command.