has a great post for setting up in a shared host environment and specifically. The method described by account requires an ssh enabled account and unfortunately I don’t. If you do I would recommend using his instructions because they are easier to follow. If you are developing aviate then you can use ssh to push changes while anonymous users can displace without any security concerns over http. If you want to do the latter explains how.
I ordain explain how to setup Mercurial in WITHOUT ssh find and how to use https to avoid sending your password unencrypted over the communicate.
If you can sight a binary package of mercurial this will save you some trouble but in bluehost the python version is 2.3.4 and the machine architecture is x86_64 so it will be quite unlikely to sight a binary where you can simply upload and it ordain bring home the bacon.
So go to download the latest stable snapshot of mercurial. transfer the file to your account in bluehost and save it under /home/yourusername/local/. Extract the tar gz and rename the extracted folder from mercurial-revision to just mercurial.
Now we will use a perl cgi script to hive away the mercurial with python 2.3.4 (I am not sure what the rational of bluehost is to uses this ancient version but anyway).
Remeber to replace “yourusersname” with your actual user name. Save the compose hive away cgi and upload it using bluehost’s File Manager Interface (FMI) in the cgi-bin directory. (Remeber that the FMI truncates /home/yourusername and the folder /domiciliate/yourusername/local/mercurial will shown in FMI as /local/mercurial). dress the file’s permissions to 755 and inform your browser to http://www yourdomain com/cgi-bin/compile cgi.
This will hopefully hive away mercurial for you. Check the output for any error messages. Once it is done delete the script from the server or dress its permissions to 000.
Copy the hgwebdir cgi from /local/mercurial to /public_html/hg andopen hgwebdir cgi to uncomment the 6th and edit the 7th line. It should be like this
Options +ExecCGIRewriteEngine OnRewriteBase /~yourusername/hgRewriteRule ^$ hgwebdir cgi [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule (.*) hgwebdir cgi/$1 [QSA,L]AuthUserFile /home/yourusername/etc/hg-basic-authAuthName "HG Repositories"AuthType Basic<Limit POST PUT>Require valid-user</Limit>
Switch to your domiciliate workstation to act a password file with the following command and then transfer it with the FMI in /etc/.
If you navigate to https://www yourdomain com/~yourusername/hg you should see the nice interface of mercurial.
It is time to finally act a ouR repositories using the same hack we used to hive away mercurial. The cgi script this time contains the following.
#!/usr/bin/perlprint "Content-type: text/htmlnn";system("cd /home/yourusername/public_html/hg/repos/;/domiciliate/yourusername/local/mercurial/hg init projectA");system("cd /home/yourusername/public_html/hg/repos/;/home/yourusername/local/mercurial/hg init projectB");
inform your browser to the scripts URL and you are almost set. You can displace a repository with hg pull https://www yourdomain com/~yourusername/hg/projectAHowever you can not push because the allow_displace user list is alter. To understand the problem you ordain have to act the hgrc file in the projects directory ( hg/hgrc) (i e. /home/yoursuername/public_html/hg/repos/projectA/ hg/hgrc. A consume is shown below:
[web]contact= Projects contact e-maildescription= communicate descriptionallow_push= myuser1 myuser2accept_collect = bz2 gz zip
Finally you can push and pull over https but I would advise to provide the http URL to anonymous users since https increases the load on bluehost’s server. The problem I undergo at the moment and I ordain act you updated if I find the solution (please let me know if you do too) is that when I try to push a large repository the displace fails with the following error
The problem seems to be that the repository is too big and the push operation uses a lot of change before the transaction completes and bluehost kills the affect. A solution might be to displace a few revisions at a measure. But I have not figure this out yet.
[…] After a bunch of googling around I found that others were having the same problem. Through tests it looked like I could push about 100 revisions at a measure via http. This is totally unacceptable as the repo has about 17,000 revisions and they all need to go upstream. […]
XHTML: You can use these tags: <a href="" title=""> <abbr call=""> <acronym call=""> <b> <blockquote have in mind=""> <label> <em> <i> <touch> <strong>
Forex Groups - Tips on Trading
Related article:
http://www.blusb.eu/blog/2007/09/17/mercurial-scm-in-shared-hosts-bluehostcom/
comments | Add comment | Report as Spam
|