We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
version: testinfra-10.0.0
testinfra-10.0.0
pytest --hosts=ssh://root:foo@bar@192.168.100.1 test.py -vvv
Captured log:
DEBUG testinfra:base.py:328 RUN CommandResult(backend=<testinfra.backend.ssh.SshBackend object at 0x7f1514287490>, exit_status=5, command=b"sshpass -p foo ssh -o User=root -o ConnectTimeout=10 -o ControlMaster=auto -o ControlPersist=60s bar@192.168.100.1 'uname -s'", _stdout=b'', _stderr=b'Permission denied, please try again.\r\n')
The text was updated successfully, but these errors were encountered:
Did you try to urlencode the password ? e.g.:
pytest --hosts 'ssh://root:foo%40bar@192.168.100.1' test.py -vvv
Sorry, something went wrong.
Did you try to urlencode the password ? e.g.: pytest --hosts 'ssh://root:foo%40bar@192.168.100.1' test.py -vvv
Thanks, it works, and it works in ansible as well.
But I'm handling passwords via environment variables, so I can't use urlencode anywhere (unless maintained separately).
Is it a good idea to use rspilt instead of spilt for parse_hostspec?
rspilt
spilt
parse_hostspec
pytest-testinfra/testinfra/backend/base.py
Lines 241 to 247 in dc48cd9
if "@" in name: user, name = name.rsplit("@", 1)
No branches or pull requests
version:
testinfra-10.0.0
pytest --hosts=ssh://root:foo@bar@192.168.100.1 test.py -vvv
Captured log:
DEBUG testinfra:base.py:328 RUN CommandResult(backend=<testinfra.backend.ssh.SshBackend object at 0x7f1514287490>, exit_status=5, command=b"sshpass -p foo ssh -o User=root -o ConnectTimeout=10 -o ControlMaster=auto -o ControlPersist=60s bar@192.168.100.1 'uname -s'", _stdout=b'', _stderr=b'Permission denied, please try again.\r\n')
The text was updated successfully, but these errors were encountered: