Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Mina is always trying to ssh via windows user name rather then the username defined in set :user #622

Open
surfermicha opened this issue Aug 14, 2018 · 5 comments
Labels
Milestone

Comments

@surfermicha
Copy link

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 the set :user, 'username' command.

@surfermicha
Copy link
Author

surfermicha commented Aug 14, 2018

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

@remon
Copy link

remon commented Nov 20, 2018

I have the same problem , did you solve it ?
@surfermicha

@surfermicha
Copy link
Author

No, the problem is not solved. I worked around with an unbuntu VM to deploy, which - of course - is very uncomfortable.

@YunzheZJU
Copy link

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.

@lovro-bikic lovro-bikic added this to the 2.0.0 milestone Aug 11, 2021
@lovro-bikic
Copy link
Member

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 #675).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants