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

Mark host to be asked for password #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ernlel
Copy link

@ernlel ernlel commented Jan 10, 2017

Ability to mark host with ask: marker and will be prompted to enter password for that host.

# Supfile

networks:
    production:
        hosts:
            - ask:[email protected]:22

It will prompt: Enter Password for [email protected]:22:

@elena-vi
Copy link

👍

@VojtechVitek
Copy link
Collaborator

Thanks for the PR!

This is a nice addition, but I'm not a big fan of the "ask:" prefix (the convention is ssh user:[email protected], so "ask" is rather user than a special Supfile sequence). If we could detect if the remote is asking for password based on stdout fd, that'd be much better. Also, making sup accept one password for multiple hosts would be nice.


I'm thinking of this instead:

networks:
    production:
        hosts:
            - user:[email protected]:22

sup -e PASSWORD=$(echo "Enter your password:"; read i; echo $i) production deploy

networks:
    production:
        env:
            PASSWORD: $(cat ~/.passwords/first)
        hosts:
            - user:[email protected]:22
networks:
    production:
        env:
            PASSWORD: $(echo "Enter your password:"; read i; echo $i)
        hosts:
            - user:[email protected]:22

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

Successfully merging this pull request may close these issues.

3 participants