WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

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

olekukonko added a commit to olekukonko/sup that referenced this pull request Dec 16, 2025
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