Closed christianmagill closed 8 years ago
My suspicion? Revisr runs in the browser, so it's the web server user "www-data" that will need permissions, not the "vagrant" user.
Doug Stewart
On Jul 12, 2015, at 3:19 PM, christianmagill notifications@github.com wrote:
I love VVV but am having some problems getting the Revisr plugin working on my installs.
I've setup a similar process on Homestead, but I love all the extra features that VVV offers so I want to make the switch.
Revisr is a Git plugin for WordPress that allows you to run PHP commands via exec in the WordPress dashboard. http://docs.revisr.io/
I am unsure how much this is a problem with Revisr or VVV but I know that on Homestead the process runs smoothly.
To start the setup I created an install of VVV and using VariableVVV I setup a project.
I used Vagrant SSH and setup a new SSH key for the virtual server. This was placed in "/home/vagrant/.ssh/id_rsa" per the defaults and I used ssh-add to add the identity.
Additionally I copied the key to my Bitbucket account where I am trying to connect.
When all is said and done, connecting by through vagrant ssh I can clone private repositories over SSH, however when using the Revisr plugin through PHP exec I get "remote repository not found" errors when adding the repository location to my settings.
Additionally if I try to pull through Revisr I receive the following error...
... Could not create directory '/var/www/.ssh'. Host key verification failed. fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists. ...
I am not sure if there is something else I need to do to make the ssh keys accessible through PHP exec.
Thanks for any help,
— Reply to this email directly or view it on GitHub.
Thanks, I suspected something of that ilk. Any idea how I could setup an ssh-key for the www-data user?
From an ssh session:
sudo -u www-data ssh-keygen
Doug Stewart
On Jul 12, 2015, at 5:22 PM, christianmagill notifications@github.com wrote:
Thanks, I suspected something of that ilk. Any idea how I could setup an ssh-key for the www-data user?
— Reply to this email directly or view it on GitHub.
Much thanks! I'll give it a try later tonight.
I entered the following command
sudo -u www-data ssh-keygen -t rsa -b 4096 -C "email@email.com"
Which prompted me to enter the file in which to save the key, which defaulted to to /var/www/.ssh/id_rsa
Using the default resulted in a could not create directory error, so I used "sudo bash" to create the directory where specified.
Re-running the ssh-keygen command and using the same default location results in a "permission denied" error on saving.
Is there somewhere else I should be saving the key?
Thanks for any help,
It's only been a year. :)
Which prompted me to enter the file in which to save the key, which defaulted to to /var/www/.ssh/id_rsa
This could work:
sudo mkhomedir_helper www-data
to setup a home directory for the www-data usersudo -u www-data ssh-keygen -t rsa -b 4096 -C "email@email.com"
/home/www-data/.ssh/id_rsa
as the location for the key.This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I love VVV but am having some problems getting the Revisr plugin working on my installs.
I've setup a similar process on Homestead, but I love all the extra features that VVV offers so I want to make the switch.
Revisr is a Git plugin for WordPress that allows you to run PHP commands via exec in the WordPress dashboard. http://docs.revisr.io/
I am unsure how much this is a problem with Revisr or VVV but I know that on Homestead the process runs smoothly.
To start the setup I created an install of VVV and using VariableVVV I setup a project.
I used Vagrant SSH and setup a new SSH key for the virtual server. This was placed in "/home/vagrant/.ssh/id_rsa" per the defaults and I used ssh-add to add the identity.
Additionally I copied the key to my Bitbucket account where I am trying to connect.
When all is said and done, connecting by through vagrant ssh I can clone private repositories over SSH, however when using the Revisr plugin through PHP exec I get "remote repository not found" errors when adding the repository location to my settings.
Additionally if I try to pull through Revisr I receive the following error...
... Could not create directory '/var/www/.ssh'. Host key verification failed. fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists. ...
I am not sure if there is something else I need to do to make the ssh keys accessible through PHP exec.
Thanks for any help,