Password input may be echoed when run Python Fabric command in crontab -
i encountered issue when trying run program through crontab on mac os. program works fine when run independently. normally, never set env.password remote system password. instead, set env.key_filename. works fine if don't have run sudo command. ideally, shouldn't prompt password typing.
by referring https://github.com/fabric/fabric/issues/1230, tried set environment variables pass password. yet, still same error. did miss? can pls?
thx
error msg:
/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/getpass.py:83: getpasswarning: can not control echo on terminal. passwd = fallback_getpass(prompt, stream) warning: password input may echoed. [xxx.xxx.xxx.xxx] login password 'xxx': [xxx.xxx.xxx.xxx] executing task 'system.monitor.free_mem' [+] start checking system total/free memory in mb: [xxx.xxx.xxx.xxx] run: free -m traceback (most recent call last): file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/main.py", line 757, in main *args, **kwargs file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/tasks.py", line 386, in execute multiprocessing file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/tasks.py", line 276, in _execute return task.run(*args, **kwargs) file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/tasks.py", line 173, in run return self.wrapped(*args, **kwargs) file "/users/thomas.pan/python-ninja/playwith/devops/system/monitor.py", line 69, in free_mem run("free -m") file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/network.py", line 687, in host_prompting_wrapper return func(*args, **kwargs) file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/operations.py", line 1090, in run shell_escape=shell_escape, capture_buffer_size=capture_buffer_size, file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/operations.py", line 930, in _run_command channel=default_channel(), command=wrapped_command, pty=pty, file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/state.py", line 424, in default_channel chan = _open_session() file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/state.py", line 416, in _open_session return connections[env.host_string].get_transport().open_session() file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/network.py", line 159, in __getitem__ self.connect(key) file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/network.py", line 151, in connect user, host, port, cache=self, seek_gateway=seek_gateway) file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/network.py", line 569, in connect password = prompt_for_password(text) file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/network.py", line 652, in prompt_for_password new_password = _password_prompt(password_prompt, stream) file "/usr/local/var/pyenv/versions/2.7.10/lib/python2.7/site-packages/fabric/network.py", line 624, in _password_prompt return getpass.getpass(prompt.encode('ascii', 'ignore'), stream) file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/getpass.py", line 83, in unix_getpass passwd = fallback_getpass(prompt, stream) file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/getpass.py", line 118, in fallback_getpass return _raw_input(prompt, stream) file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/getpass.py", line 135, in _raw_input raise eoferror eoferror
Comments
Post a Comment