This specific content was written 11 years ago.
Please keep this in mind as it may be outdated and not adhering to best-practices.
“Revisr is a Git and WordPress database plugin that allows you to keep track of your web projects in version control. Revisr eliminates redundant interfaces in your workflow and allows you to focus on the task at hand.” – Revisr
That sounds well and good. However, configuration required a few steps and below we document them.
It is needed to install git, create certificates, upload them to github, and also set appropriate permissions.
Steps
- Temporarily allow login by the www-data account.
Open /etc/passwd with nano or vi, and replace :usr/sbin/nologin with :/bin/bash
See: http://programster.blogspot.gr/2014/05/ubuntu-1404-allow-login-as-www-data-user.html
- Install git.
sudo apt-get install git
- Create a certificate for www-data user and set permissions.
a) Go to www directory and change owners:
~/# cd /var/www
/var/www# chown www-data .
b) Generate a certificate:
sudo -u www-data ssh-keygen -t rsa
You shouldn’t enter a passphrase and you should see the correct key.
- Open the generated certificate and copy the text inside:
root@server:/var/www/# cd .ssh
root@server:/var/www/.ssh# cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOL…etc
-
Go to Github site and upload the certificate.
A) See step 4 of https://help.github.com/articles/generating-ssh-keys/
B) Add your specific key to the github website at: https://github.com/settings/ssh
- Test the connection to github:
sudo -u www-data bash
ssh -T [email protected]
You should see:
Hi username! You've successfully authenticated, but GitHub does not # provide shell access.
Type "Exit" to exit www-data terminal and type "sudo bash" to start root terminal.
Type:
exit
sudo bash
-
Go to the wordpress directory and set the correct permissions. Reference: http://stackoverflow.com/questions/18352682/correct-file-permissions-for-wordpress
chown www-data:www-data -R * # Let apache be owner
find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r-
- Create a github repository and then connect revisr with this:
Use the notation for SSH remote URL ( do not use https address).
Example: in Remote URL enter: [email protected]:developerAccount/project.git
- Create a github repository inside the wordpress folder (see here for more info):
A) Go to your folder and execute
git init
B) You should now be able to add and commit files using either the command line or the revisr command panel
- Check to see that permissions are correct for your wordpress git repository. You can run ls -lqa to check the owner and check within the .git folder as well. The following commands should be sufficient to set correct ownership to www-data:
chown www-data:www-data -R .[^.]*
chown www-data:www-data .
The following steps should do it. Post your comments or questions below or send me an e-mail.
Mr. Menelaos Bakopoulos is currently pursuing his PhD both at Center for TeleInFrastruktur (CTiF) at Aalborg University (AAU) in Denmark and Athens Information Technology (AIT) in Athens, Greece. He received a Master in Information Technology and Telecommunications Systems from Athens Information Technology and a B.Sc. in Computer Science & Management Information Systems from the American College of Thessaloniki. Since April 2008 he has been a member of the Multimedia, Knowledge, and Web Technologies Group.
More Posts
Jun 10 2015
WordPress Revisr Plugin: Connecting with Github
That sounds well and good. However, configuration required a few steps and below we document them.
It is needed to install git, create certificates, upload them to github, and also set appropriate permissions.
Steps
Open /etc/passwd with nano or vi, and replace :usr/sbin/nologin with :/bin/bash
See: http://programster.blogspot.gr/2014/05/ubuntu-1404-allow-login-as-www-data-user.html
a) Go to www directory and change owners:
b) Generate a certificate:
You shouldn’t enter a passphrase and you should see the correct key.
Go to Github site and upload the certificate.
A) See step 4 of https://help.github.com/articles/generating-ssh-keys/
B) Add your specific key to the github website at: https://github.com/settings/ssh
You should see:
Type:
Go to the wordpress directory and set the correct permissions. Reference: http://stackoverflow.com/questions/18352682/correct-file-permissions-for-wordpress
chown www-data:www-data -R * # Let apache be owner find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r-Use the notation for SSH remote URL ( do not use https address).
Example: in Remote URL enter: [email protected]:developerAccount/project.git
A) Go to your folder and execute
B) You should now be able to add and commit files using either the command line or the revisr command panel
The following steps should do it. Post your comments or questions below or send me an e-mail.
Menelaos Bakopoulos
Mr. Menelaos Bakopoulos is currently pursuing his PhD both at Center for TeleInFrastruktur (CTiF) at Aalborg University (AAU) in Denmark and Athens Information Technology (AIT) in Athens, Greece. He received a Master in Information Technology and Telecommunications Systems from Athens Information Technology and a B.Sc. in Computer Science & Management Information Systems from the American College of Thessaloniki. Since April 2008 he has been a member of the Multimedia, Knowledge, and Web Technologies Group.
More Posts
Related posts:
By Menelaos Bakopoulos • GIT, GIT version control, Linux, Uncategorized 0