2016-01-31 23 views
5

Quando eseguo "vagrant up", ho riscontrato errori di sotto. Non ne ho idea Precedentemente sono stato eseguito senza errori. Ho venduto SSD Harddisk e l'ho preso. Quando voglio di nuovo l'installazione, ho riscontrato questi errori.Vagrant up non funziona

/Users/KerimCaglar/sites/Homestead/scripts/homestead.rb:106:in `read': No such file or directory @ rb_sysopen - /Users/KerimCaglar/KerimCaglar/.ssh/id_rsa (Errno::ENOENT) 
from /Users/KerimCaglar/sites/Homestead/scripts/homestead.rb:106:in `block (2 levels) in configure' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/kernel_v2/config/vm_provisioner.rb:72:in `call' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/kernel_v2/config/vm_provisioner.rb:72:in `add_config' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/kernel_v2/config/vm.rb:321:in `provision' 
from /Users/KerimCaglar/sites/Homestead/scripts/homestead.rb:103:in `block in configure' 
from /Users/KerimCaglar/sites/Homestead/scripts/homestead.rb:102:in `each' 
from /Users/KerimCaglar/sites/Homestead/scripts/homestead.rb:102:in `configure' 
from /Users/KerimCaglar/sites/Homestead/Vagrantfile:20:in `block in <top (required)>' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/v2/loader.rb:37:in `call' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/v2/loader.rb:37:in `load' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:113:in `block (2 levels) in load' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:107:in `each' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:107:in `block in load' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:104:in `each' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:104:in `load' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/vagrantfile.rb:28:in `initialize' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:740:in `new' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:740:in `vagrantfile' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:486:in `host' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:208:in `block in action_runner' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:33:in `call' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:33:in `run' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:473:in `hook' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:722:in `unload' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant:177:in `ensure in <main>' 
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant:177:in `<main>' 
+0

L'errore è proprio lì sulla prima linea delle copie. Dov'è '/ Users/KerimCaglar/KerimCaglar/.ssh/id_rsa'? – maiorano84

+0

Ho anche questo problema - /path/to/some/folder/folder/file.ext (Errno :: ENOENT) e la "cartella" è chiaramente duplicata. Vagrantfile non ha il percorso duplicato. – JBRWilkinson

risposta

22

La parte importante di tale errore è qui:

Nessun file o directory @ tale rb_sysopen - /Users/KerimCaglar/KerimCaglar/.ssh/id_rsa

Si sia rifugio 'ha generato la chiave SSH o è necessario specificare il percorso corretto.

Se guardate il file Homestead.yaml si dovrebbe vedere il percorso della chiave SSH:

authorize: ~/.ssh/id_rsa.pub 

keys: 
    - ~/.ssh/id_rsa 

Se la vostra chiave SSH è da qualche altra parte è necessario specificare il percorso corretto. Altrimenti dovrai generarlo.

ssh-keygen -t rsa -C "[email protected]" 

Source.

+0

eseguo questo comando e genera due file ma non ho trovato alcuna cartella .ssh sul mio pc (im usando windows) –

2

La parte fondamentale dell'errore è il percorso duplicato:

/Users/KerimCaglar/KerimCaglar/.ssh/id_rsa (Errno::ENOENT)

Si noti come il nome utente è menzionato due volte. Ho trovato questo essere causato da:

  1. Specificare troppo percorso nel Vagrantfile, ad es.

    config.vm.provision "file", fonte: "KerimCaglar /.ssh/id_rsa", destinazione: ".ssh/rd_rsa"

  2. Stai invocando vagrant up da una sottodirectory - cd ..; vagrant up sarà aggiustalo.

0

Se hai installato Git, tutto ciò che devi fare è semplicemente generare la tua chiave ssh attraverso la GUI. Aiuto -> Mostra chiave

enter image description here