Re: [vagrant-up] Moving vagrant ssh key to be used outside of vagrant

16 views
Skip to first unread message

Jim McGinness

unread,
May 9, 2019, 11:01:17 PM5/9/19
to vagra...@googlegroups.com
Fil,

Relative to the directory containing the Vagrantfile, you can locate the private key used by "vagrant ssh" under the .vagrant/machines folder. The complete path depends on the target name and provider. So I have a file named:

  .vagrant/machines/default/virtualbox/private_key

But there's another way, which is to use a personal access token:


 -- jmcg

Jim McGinness

unread,
May 9, 2019, 11:16:12 PM5/9/19
to vagra...@googlegroups.com
I see there are circumstances where it helps to _not_ delete the usually redundant repetition of the prior posts in the thread.

On Thu, May 9, 2019 at 9:27 PM Fil Gambatesa <runf...@gmail.com> wrote:
I originally set up a project inside a vagrant virtual box and connect it to GitHub using the SSH keys that were generated within vagrant.

I am now moving outside of the vagrant environment and working locally and cannot do a git push origin master because the local ssh key does not match what's on GitHub.

Is there a way to move the vagrant ssh key to my local ssh directory so that I can push to GitHub outside of my vagrant box?

Hope the question makes sense.

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/bfd7461f-ac09-40ac-84e5-4d9c8901ff66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fil Gambatesa

unread,
May 10, 2019, 7:47:46 AM5/10/19
to vagra...@googlegroups.com
Thanks for the reply Jim.  I ended up just adding my local ssh key to GitHub and that solved the problem.  Now I can push from within Vagrant and outside of it as well.
--

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+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages