2
我想提供我與美食流浪漢中,我跟着這個tutorial但是當我嘗試提供我的盒子vagrant provision
命令我得到了一個錯誤:面料遊民無法打開insecure_private_key
[default] Running provisioner: fabric...
[127.0.0.1] Executing task 'provide'
[127.0.0.1] sudo: apt-get update
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/fabric/main.py", line 743, in main
*args, **kwargs
File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 368, in execute
multiprocessing
File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 264, in _execute
return task.run(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 171, in run
return self.wrapped(*args, **kwargs)
File "/home/user/projects/volaris2013/provision.py", line 10, in provide
prepare_os()
File "/home/user/projects/volaris2013/provision.py", line 32, in prepare_os
sudo('apt-get update')
File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 578, in host_prompting_wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line 1095, in sudo
stderr=stderr, timeout=timeout, shell_escape=shell_escape,
File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line 909, in _run_command
channel=default_channel(), command=wrapped_command, pty=pty,
File "/usr/local/lib/python2.7/dist-packages/fabric/state.py", line 388, in default_channel
chan = _open_session()
File "/usr/local/lib/python2.7/dist-packages/fabric/state.py", line 380, in _open_session
return connections[env.host_string].get_transport().open_session()
File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 118, in __getitem__
self.connect(key)
File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 110, in connect
self[key] = connect(user, host, port, sock)
File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 392, in connect
sock=sock
File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 342, in connect
self._auth(username, password, pkey, key_filenames, allow_agent, look_for_keys)
File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 462, in _auth
key = pkey_class.from_private_key_file(key_filename, password)
File "/usr/local/lib/python2.7/dist-packages/paramiko/pkey.py", line 198, in from_private_key_file
key = cls(filename=filename, password=password)
File "/usr/local/lib/python2.7/dist-packages/paramiko/rsakey.py", line 51, in __init__
self._from_private_key_file(filename, password)
File "/usr/local/lib/python2.7/dist-packages/paramiko/rsakey.py", line 163, in _from_private_key_file
data = self._read_private_key_file('RSA', filename, password)
File "/usr/local/lib/python2.7/dist-packages/paramiko/pkey.py", line 279, in _read_private_key_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '[/home/user/.vagrant.d/insecure_private_key]'
我想該錯誤位於括號內的文件名周圍,但我不知道如何解決這個問題,過去我有類似的錯誤,但是在結構任務中,我在env任務中解決了這個問題。
包的版本:
- 流浪1.4.2
- 面料== 1.8.0
- 美食== 0.6.5
- 的paramiko == 1.12.0
- 的VirtualBox 4.3.9