Vagrant Google Plugin issues

62 views
Skip to first unread message

jru...@smithss.org

unread,
May 24, 2017, 5:07:29 PM5/24/17
to Vagrant
Hello,

I believe I have everything setup correctly, but when I try to run `vagrant up --provider=google` I get the following error

Private key for Google could not be found in the specified location

I have confirmed the SSH key does in fact exist in the specified location and if I manually run

`ssh -i /path/to/sshkey username@IP`   it logs me in successfully. 

Where can I look to debug this issue? 

Thanks,
-js

Alvaro Miranda Aguilera

unread,
May 25, 2017, 4:15:16 AM5/25/17
to vagra...@googlegroups.com
Hello

That error happen when none of these is set:

config.google_key_location
config.google_json_key_location

which from the readme is this file:

google.google_json_key_location = "/path/to/your/private-key.json"

can you check you have that file and the path is good?

Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/5ff626dd-e18a-4008-ab29-d9d4f874d76c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Jason Smith

unread,
May 25, 2017, 1:25:42 PM5/25/17
to vagra...@googlegroups.com
Hello,
I have the following in my Vagrantfile: 

Vagrant.configure("2") do |config|
  config.vm.box = "google/gce"

  config.vm.provider :google do |google, override|
    google.google_project_id = "vagrant-168620"
    google.google_client_email = "vag...@vagrant-168620.iam.gserviceaccount.com"
    google.google_json_key_location = "~/creds/vagrant-a46870ac43b5.json"

    override.ssh.username = "jruels"
    override.ssh.private_key_path = "/Users/jruels/.ssh/id_rsa"
  end

end

The JSON file downloaded from Google exists in the specified location.

ls -ltr ~/creds/vagrant-a46870ac43b5.json
-rw-r--r--@ 1 jruels  staff  2318 May 24 14:00 /Users/jruels/creds/vagrant-a46870ac43b5.json

Anything else I can try to figure out where it's failing?

Thanks,
-js
-- Typo’s courtesy of Apple --
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/PnKaCfDrbFw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyGes5ZfuZExE_bF83LVxV5SGG%2BVMMYW7YNs5phj0d-DA%40mail.gmail.com.

jru...@smithss.org

unread,
May 25, 2017, 1:35:27 PM5/25/17
to Vagrant
Actually it looks like I found the issue. 

Can't use ~  when specifying path to JSON file. 

Problem Resolved. 

Thanks,
-js

To unsubscribe from this group and all its topics, send an email to vagrant-up+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages